Should (content instanceof ChromeWindow) not be true?

RESOLVED FIXED

Status

()

defect
--
trivial
RESOLVED FIXED
14 years ago
2 months ago

People

(Reporter: neil, Assigned: peterv)

Tracking

Trunk
Points:
---
Bug Flags:
blocking1.9 -
wanted1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

14 years ago
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?
Reporter

Comment 2

14 years ago
(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?

Updated

13 years ago
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
Assignee

Comment 4

10 years ago
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 → ---
Assignee: jst → nobody
Assignee

Comment 6

10 years ago
Posted patch v1Splinter 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
Assignee

Comment 8

4 months ago

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

Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago4 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.