Closed Bug 305528 Opened 19 years ago Closed 19 years ago

Cannot setTimeout window.focus or window.alert

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: bzbarsky, Assigned: jst)

References

()

Details

(Keywords: fixed1.8, Whiteboard: [HAVE FIX])

Attachments

(1 file)

This is fallout from splitwindow, based on the regression date range (which is
somewhere in
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-07-30+07%3A00%3A00&maxdate=2005-07-31+12%3A00%3A00&cvsroot=%2Fcvsroot
).  To reproduce, load the URL in the URL bar and note that the JS console shows
an error instead of an alert saying "success" coming up.  The error is:

Error: uncaught exception: [Exception... "Illegal operation on WrappedNative
prototype object"  nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" 
location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: no]
Requesting blocking so that we at least evaluate what's going on here...
Flags: blocking1.8b4?
Just for kicks, the same thing happens if you're using script directly instead
of a javascript: URI, right?
Flags: blocking1.8b4? → blocking1.8b4+
Yes.
Flags: blocking1.8b5+
Assignee: general → jst
This makes XPCWrappedNative::GetWrappedNativeOfJSObject() use obj's outer if it
can't find a wrapper with the given obj, which in this case is an inner window,
but the function we're calling comes from the outer window.
Attachment #193751 - Flags: superreview?(brendan)
Attachment #193751 - Flags: review?(shaver)
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Whiteboard: [HAVE FIX]
Target Milestone: --- → mozilla1.8beta4
Comment on attachment 193751 [details] [diff] [review]
Make xpconnect attempt to use obj's outer if it can't find a wrapper using the given obj

Pre-emptive a=me as well as sr=me.  This is it.

/be
Attachment #193751 - Flags: superreview?(brendan)
Attachment #193751 - Flags: superreview+
Attachment #193751 - Flags: approval1.8b4+
Comment on attachment 193751 [details] [diff] [review]
Make xpconnect attempt to use obj's outer if it can't find a wrapper using the given obj

r=shaver
Attachment #193751 - Flags: review?(shaver) → review+
Fixed on trunk and branch.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8
OS: All → Linux
Hardware: All → PC
Resolution: --- → FIXED
Target Milestone: mozilla1.8beta4 → ---
Verified FIXED using build 2005-09-03-05 on Windows XP SeaMonkey trunk.
Status: RESOLVED → VERIFIED
OS: Linux → All
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: