Closed Bug 406334 Opened 18 years ago Closed 18 years ago

drawWindow call crashes

Categories

(Core :: Graphics: Canvas2D, defect, P3)

x86
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: mossop, Assigned: vlad)

References

()

Details

(Keywords: crash)

Attachments

(2 files)

Attached file testcase —
The attached testcase crashes with bp-e7c013eb-9f6b-11dc-a7b9-001a4bd43e5c. The testcase requires privileges so save locally and it will request them on run.
The crash is because the window (here an iframe's content window) doesn't QI to an nsIPIDOMWindow. Not sure when that would ever happen?
I guess yes I would like it to block, at the very least it is causing me problems trying to write testcases for other bugs. Thing is though I haven't managed to reproduce it from chrome script, only when the script is running in a webpage, so maybe something is up with the process elevation.
Flags: blocking1.9?
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Assignee: nobody → vladimir
Attached patch boring fix — — Splinter Review
nullcheck piwin QI in here, and we avoid this. drawWindow will fail shortly after, because we check the piwin QI in DrawWindow itself as well.
Attachment #302039 - Flags: review?(roc)
Any idea what the underlying bug is here? I'm not really sure how a window can fail to QI to nsPIDOMWindow.
Why should the drawWindow call fail at all in this case? The page has elevated privileges so I don't understand why it shouldn't be able to use drawWindow, or am I missing something?
Because of the failure to QI to nsPIDOMWindow. I don't know why that's happening -- I can certainly look into it, but doing that will be much lower on my todo list. I mainly wanted to bandaid over this crash (given that we really should have null checked in the first place, since we do it later on anyway).
This is a combination of bug 396851 and an unfiled bug where if you pass a cross-origin XOW-wrapped object into C++, it'll become an XPCWrappedJS instead of throwing an exception (which is desired, the idea is to remove the need to perform security checks in C++ code -- if you have an nsIFoo that originated in JS, the JS code that passed it to you must have had same-origin or similar access).
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: