Last Comment Bug 746021 - browser_webconsole_bug_603750_websocket.js breaks with compartment-per-global
: browser_webconsole_bug_603750_websocket.js breaks with compartment-per-global
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Firefox 14
Assigned To: Bobby Holley (:bholley) (busy with Stylo)
:
:
Mentors:
Depends on:
Blocks: cpg
  Show dependency treegraph
 
Reported: 2012-04-16 17:47 PDT by Bobby Holley (:bholley) (busy with Stylo)
Modified: 2012-04-17 18:16 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Don't assert that the window ids are the same when they shouldn't be. v1 (1023 bytes, patch)
2012-04-16 17:49 PDT, Bobby Holley (:bholley) (busy with Stylo)
mihai.sucan: review+
Details | Diff | Splinter Review

Description Bobby Holley (:bholley) (busy with Stylo) 2012-04-16 17:47:48 PDT
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.
Comment 1 Bobby Holley (:bholley) (busy with Stylo) 2012-04-16 17:49:25 PDT
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.
Comment 2 Bobby Holley (:bholley) (busy with Stylo) 2012-04-16 17:54:33 PDT
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 3 Mihai Sucan [:msucan] 2012-04-17 08:57:35 PDT
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!
Comment 4 Bobby Holley (:bholley) (busy with Stylo) 2012-04-17 10:26:36 PDT
Pushed to m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/a0ecc336b66d
Comment 5 Ed Morley [:emorley] 2012-04-17 18:16:35 PDT
https://hg.mozilla.org/mozilla-central/rev/a0ecc336b66d

Note You need to log in before you can comment on or make changes to this bug.