Closed Bug 390001 Opened 17 years ago Closed 17 years ago

Enumeration over cross origin wrappers doesn't work

Categories

(Core :: XPConnect, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9alpha7

People

(Reporter: franklin, Assigned: mrbkap)

References

()

Details

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a7pre) Gecko/2007072804 Minefield/3.0a7pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a7pre) Gecko/2007072804 Minefield/3.0a7pre

After logging into Yahoo Mail beta, all seems to load properly but when the messenger feature at the top begins to stir, a dialog box pops onto the screen, and is followed by a crash.

Reproducible: Always

Steps to Reproduce:
1. Make sure Yahoo Messenger feature is turned on in Yahoo Mail beta
2. Log into Yahoo Mail beta at http://mail.yahoo.com
3. Dialog box will appear, click ok (only option)
5. Crash
Actual Results:  
Crash

Expected Results:  
Page load

http://crash-stats.mozilla.com/report/index/a9b08028-3d7b-11dc-828b-001a4bd46e84?date=2007-07-29-02

Tested on Gecko/2007072804 Minefield/3.0a7pre on Windows XP as well.  Same result.
Attached image Screenshot of dialog box (deleted) —
Keywords: crash
Version: unspecified → Trunk
This started with a 20070727 build
Status: UNCONFIRMED → NEW
Ever confirmed: true
I can confirm that here as well.
And of course crash reporter doesn't work like normal so I can't provide and data.  Should note that we can not even read our email or click on the switch back option to go back to old version of yahoo so we are pretty much SOL for reading emails.
Flags: blocking-firefox3?
Assignee: nobody → general
Component: General → JavaScript Engine
Flags: blocking-firefox3?
Product: Firefox → Core
QA Contact: general → general
probable dupe of bug Bug 389753
Whiteboard: [DUPEME]
i am getting the same error pop up but no crashes

Flags: blocking1.9?
OS > ALL

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a7pre) Gecko/2007072922 Minefield/3.0a7pre ID:2007072922
OS: Linux → All
Yeah I' am no longer getting any crashes but still get the dialog. Hmmmm.
The crash should be gone (reopen bug 389753 if it isn't), this bug is about the alert boxes that pop up -- I believe that the problem is that enumeration over cross origin wrappers no longer works.
Blocks: xow
Severity: critical → major
Keywords: crash
Summary: Yahoo Mail beta crashes firefox [@ JS_GetClass()] → Enumeration over cross origin wrappers doesn't work
Whiteboard: [DUPEME]
Assignee: general → nobody
Component: JavaScript Engine → XPConnect
QA Contact: general → xpconnect
Flags: blocking1.9? → blocking1.9+
Flags: in-testsuite?
Attached patch Proposed (obsolete) (deleted) — Splinter Review
This should fix things, the patch is actually just adding a:
do {
...
} while ((innerObj = JS_GetPrototype(cx, innerObj));

with some changes to make it compile. The problem was that we weren't enumerating up our prototype -- which confused XPConnect into not resolving any properties.
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #274695 - Flags: superreview?(jst)
Attachment #274695 - Flags: review?(jst)
Attachment #274695 - Flags: review?(brendan)
Attached patch Proposed fix (deleted) — Splinter Review
Oops, that last patch had some debugging code in it.
Attachment #274695 - Attachment is obsolete: true
Attachment #274696 - Flags: superreview?(jst)
Attachment #274696 - Flags: review?(jst)
Attachment #274696 - Flags: review?(brendan)
Attachment #274695 - Flags: superreview?(jst)
Attachment #274695 - Flags: review?(jst)
Attachment #274695 - Flags: review?(brendan)
Attachment #274696 - Flags: superreview?(jst)
Attachment #274696 - Flags: superreview+
Attachment #274696 - Flags: review?(jst)
Attachment #274696 - Flags: review+
Attachment #274696 - Flags: review?(brendan) → review+
Setting the milestone to M7 so people know why the tree is still closed.
Target Milestone: --- → mozilla1.9 M7
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attached patch Mochitest (deleted) — Splinter Review
This patch creates a mochitest for all testable XOW bugs. I'm not sure what the right tone is for the strings in the is() and ok() tests, but these seem to be OK.
Attachment #275192 - Flags: review?(sayrer)
Attachment #275192 - Flags: review?(sayrer) → review+
Attachment #275192 - Flags: superreview?(bzbarsky)
Comment on attachment 275192 [details] [diff] [review]
Mochitest

So is window.location always wrapped in XOW, even when accessed from inside the window itself?

>+    try {
>+        is('PASS', window.eval("'PASS'"), 'window.eval throws an exception');
>+    } catch (e) {
>+        ok(false, 'window.eval does not throw an exception');

Those messages seem to be backwards...
Comment on attachment 275192 [details] [diff] [review]
Mochitest

sr=bzbarsky.  Per Blake on irc, we do wrap window.location, since it lives on the outer window and hence its object principal might change.
Attachment #275192 - Flags: superreview?(bzbarsky) → superreview+
I checked the mochitest in.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: