Bug 1237904 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I tested this and I can nicely reproduce the issue:

1) Apply Alexe's patch
2) Build & run Firefox
3) Check the Browser Console
4) No stack trace for `Error: foo` -> BUG

Honza

---

I also tried to introduce some sync frames in my patch:

```js
diff --git a/devtools/shared/Loader.jsm b/devtools/shared/Loader.jsm
--- a/devtools/shared/Loader.jsm
+++ b/devtools/shared/Loader.jsm
@@ -238,8 +238,25 @@ this.require = this.devtools.require.bin

 // For compatibility reasons, expose these symbols on "devtools":
 Object.defineProperty(this.devtools, "Toolbox", {
   get: () => this.require("devtools/client/framework/toolbox").Toolbox,
 });
 Object.defineProperty(this.devtools, "TargetFactory", {
   get: () => this.require("devtools/client/framework/target").TargetFactory,
 });
+
+let {setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
+setTimeout(function() {
+  a();
+});
+
+function a() {
+  b();
+}
+
+function b() {
+  c();
+}
+
+function c() {
+  throw new Error("foo"); // <== this error won't have stack in the browser console
+}
\ No newline at end of file
```
I tested this and I can nicely reproduce the issue:

1) Apply Alexe's patch
2) Build & run Firefox
3) Check the Browser Console
4) No stack trace for `Error: foo` -> BUG

Honza

---

I also tried to introduce some sync frames in my patch (they are not visible either in the stack):

```js
diff --git a/devtools/shared/Loader.jsm b/devtools/shared/Loader.jsm
--- a/devtools/shared/Loader.jsm
+++ b/devtools/shared/Loader.jsm
@@ -238,8 +238,25 @@ this.require = this.devtools.require.bin

 // For compatibility reasons, expose these symbols on "devtools":
 Object.defineProperty(this.devtools, "Toolbox", {
   get: () => this.require("devtools/client/framework/toolbox").Toolbox,
 });
 Object.defineProperty(this.devtools, "TargetFactory", {
   get: () => this.require("devtools/client/framework/target").TargetFactory,
 });
+
+let {setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
+setTimeout(function() {
+  a();
+});
+
+function a() {
+  b();
+}
+
+function b() {
+  c();
+}
+
+function c() {
+  throw new Error("foo"); // <== this error won't have stack in the browser console
+}
\ No newline at end of file
```

Back to Bug 1237904 Comment 7