Closed Bug 396849 Opened 17 years ago Closed 17 years ago

XOW breaks instanceof

Categories

(Core :: XPConnect, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: mrbkap)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Attached file test (deleted) —
See attached testcase.  Basically, if a XOW is on either side of the instanceof operator, bad things happen.  You'll need to run the testcase from local disk so it can get the privs to do cross-site access.
Flags: blocking1.9?
Not sure how likely this is to show up in the wild. Will simply doing

window instanceof Window

break? Or will you have to have different origins on the two sides of the operator?

Blake, what's the chances of you having time to fix this in time for release?
I think you probably need different origins...
This is a little scary to let out in the wild since it might break sites.
Assignee: nobody → mrbkap
Flags: blocking1.9? → blocking1.9+
Attached patch patch v1 (obsolete) (deleted) — Splinter Review
I'm not sure if my assertion about this not giving away too much information is true here, but it seems reasonable to me. Note that if we *do* do security checks here, then the testcase will fail to work because of bug 396851.
Attachment #283843 - Flags: review?(jst)
Comment on attachment 283843 [details] [diff] [review]
patch v1

r+sr=jst, but please add the IsWrapperOfSameOrigin() check we talked about and throw if the wrapper is not same origin.
Attachment #283843 - Flags: superreview+
Attachment #283843 - Flags: review?(jst)
Attachment #283843 - Flags: review+
Attached patch Updated patch (deleted) — Splinter Review
This is what I'll check in when the tree is next both open and green.
Attachment #283843 - Attachment is obsolete: true
I'll also file a followup on the less important |XOW instanceof Components.interfaces.xxx| case when the XOW is cross origin from this script.
Status: NEW → ASSIGNED
Fix checked into trunk. bug 408887 filed on comment 7.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: