I queried Bugzilla for instanceof ChromeWindow and found no hits, which surprised me, as Mozilla 1.6 has this bug. Steps to reproduce problem: 1. From the browser, open the JS console 2. Evaluate top.opener.content instanceof ChromeWindow Expected result: false Actual result: true Workaround: use Components.interfaces.nsIDOMChromeWindow
It returns true for me now, with the 2005-08-27 trunk build. -> WFM?
(In reply to comment #1) >It returns true for me now, with the 2005-08-27 trunk build. -> WFM? Comment #0 says Expected result: false
This happens because sClassInfoData[class_name_struct->mDOMClassInfoID].mProtoChainInterface is nsIDOMWindow for chromewindow. And that happens because the classinfo for ChromeWindow is: DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ChromeWindow, nsIDOMWindow) which means to use nsIDOMWindow as the proto chain interface. Should we be using nsIDOMChromeWindow instead? I'm not sure what else that proto chain interface affects...
Flags: blocking1.9a1? → blocking1.9-
Looks like this is fixed now. |alert(top.opener.content instanceof ChromeWindow)| alerts true for me. No idea what whould have fixed it.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
(In reply to comment #4) > Looks like this is fixed now. |alert(top.opener.content instanceof > ChromeWindow)| alerts true for me. It's expected to be false.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Sorry, got confused. This works I think, need to think a bit more about it. Also need to add an automated testcase.
Assignee: nobody → peterv
Status: REOPENED → ASSIGNED
(In reply to comment #6) > Created attachment 418021 [details] [diff] [review] > v1 > > Sorry, got confused. > > This works I think, need to think a bit more about it. Have you thought about it? Any update?
OS: Windows 2000 → All
Hardware: x86 → All
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago → 4 months ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.