The default bug view has changed. See this FAQ.

browser_webconsole_bug_603750_websocket.js breaks with compartment-per-global

RESOLVED FIXED in Firefox 14

Status

()

Firefox
Developer Tools: Console
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

unspecified
Firefox 14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We assert that the window IDs for two WebSockets errors are the same:

http://mxr.mozilla.org/mozilla-central/source/browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js#33

However, the sockets are created in different scopes:
http://mxr.mozilla.org/mozilla-central/source/browser/devtools/webconsole/test/test-bug-603750-websocket.js

This means that the code that throws is running against a different global in the iframe case for compartment-per-global. It's not clear to me why we assert this, so I'm removing it.
Created attachment 615569 [details] [diff] [review]
Don't assert that the window ids are the same when they shouldn't be. v1

Attaching a patch. Flagging msucan for review.
Attachment #615569 - Flags: review?(mihai.sucan)
For context, the window id is coming from here:

http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsWebSocket.cpp#1571

which uses:

http://mxr.mozilla.org/mozilla-central/source/dom/base/nsJSUtils.cpp#170
Comment on attachment 615569 [details] [diff] [review]
Don't assert that the window ids are the same when they shouldn't be. v1

Review of attachment 615569 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good. Thank you!
Attachment #615569 - Flags: review?(mihai.sucan) → review+
Pushed to m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/a0ecc336b66d
Target Milestone: --- → Firefox 14
https://hg.mozilla.org/mozilla-central/rev/a0ecc336b66d
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.