Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. commit a2a0ca5336c1e1cdbb8e88750ccdee6ea558ef55
  2. Author: Jason Laster <jlaster@mozilla.com>
  3. Date: Tue Apr 9 21:23:16 2019 -0400
  4.  
  5. Bug 1543291 - Log Points could be nested by call site
  6.  
  7. diff --git a/devtools/server/actors/breakpoint.js b/devtools/server/actors/breakpoint.js
  8. index 327115d0e1ac..d8e807f81e9c 100644
  9. --- a/devtools/server/actors/breakpoint.js
  10. +++ b/devtools/server/actors/breakpoint.js
  11. @@ -237,14 +237,35 @@ BreakpointActor.prototype = {
  12. value = value.unsafeDereference();
  13. }
  14.  
  15. - const message = {
  16. + const location = {
  17. filename: url,
  18. lineNumber: generatedLine,
  19. columnNumber: generatedColumn,
  20. - level: "logPoint",
  21. - arguments: value,
  22. };
  23. - this.threadActor._parent._consoleActor.onConsoleAPICall(message);
  24. +
  25. + this.threadActor._parent._consoleActor.onConsoleAPICall({
  26. + ...location,
  27. + level: "group",
  28. + groupName: displayName,
  29. + arguments: [displayName],
  30. + });
  31. +
  32. + if (logValue != "displayName") {
  33. + this.threadActor._parent._consoleActor.onConsoleAPICall({
  34. + ...location,
  35. + level: "logPoint",
  36. + arguments: value,
  37. + });
  38. + }
  39. +
  40. + frame.onPop = () => {
  41. + this.threadActor._parent._consoleActor.onConsoleAPICall({
  42. + ...location,
  43. + level: "groupEnd",
  44. + groupName: displayName,
  45. + arguments: [displayName],
  46. + });
  47. + };
  48.  
  49. // Never stop at log points.
  50. return undefined;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement