Closed Bug 295460 Opened 21 years ago Closed 7 years ago

Should (content instanceof ChromeWindow) not be true?

Categories

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

defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: peterv)

Details

Attachments

(1 file)

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
Keywords: helpwanted
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?
Flags: blocking1.9a1? → blocking1.9-
Whiteboard: [wanted-1.9]
Status: NEW → ASSIGNED
Assignee: general → jst
Status: ASSIGNED → NEW
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
QA Contact: ian → general
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
Closed: 16 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 → ---
Assignee: jst → nobody
Attached patch v1 — — Splinter Review
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?
Keywords: helpwanted
OS: Windows 2000 → All
Hardware: x86 → All

ChromeWindow was removed by switching to WebIDL, there's an isChromeWindow method on Window (added in bug 1383059).

Status: ASSIGNED → RESOLVED
Closed: 16 years ago → 7 years ago
Resolution: --- → FIXED
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: