Closed Bug 296218 Opened 20 years ago Closed 19 years ago

document.open causes "null" error when opening document of browser element in chrome window

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: felix.ritter, Assigned: jst)

References

Details

(Keywords: regression)

Attachments

(1 file)

392 bytes, application/vnd.mozilla.xul+xml
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 I have an browser element in a chrome window. After opening the window a javascript is executed which tries to open the document of the embedded browser element (onload='theJavaScriptFunction()'). The document.open call creates this error: "null". The document object itself is not null. The problem exists in FF 1.0+ (Build 20050526) but not in FF 1.0.4! Reproducible: Always Steps to Reproduce: 1. create a chrome window with embedded browser element 2. open the window 3. try to open the document of the embedded browser element Actual Results: Javascript-Error: "null" Expected Results: open the document The bug does not exist in Firefox 1.0.4!
Version: unspecified → Trunk
same here on: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050527 Firefox/1.0+ I guess some kind of testcase would be welcome.
Assignee: nobody → general
Status: UNCONFIRMED → NEW
Component: General → DOM: Level 0
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: general → ian
This breaks a few extensions, I guess (this has been asked at least twice on the forums this week). Asking for blocking 1.1.
Flags: blocking-aviary1.1?
Attached file testcase
Open this with with chrome privileges to test.
JST, is this something we can fix so we don't break extensions?
Assignee: general → jst
Flags: blocking-aviary1.1? → blocking1.8b4?
I don't see this exact exception any more, when I test this I see an exception about not passing enough arguments to document.open(), and the reason for that is that we treat document.open specially to support optional arguments, but in the new world of implicit wrapping of content objects in XPCNativeWrapper's from chrome we don't get that little thunk to help with that. bz's fixes for bug 296967 may fix this, if not, I don't think we want to special case this. Developers can work around this by replacing document.open() with document.wrappedJSObject.open().
Yeah, the bug 296967 patch fixes document.open() with no args.
Depends on: 296967
Flags: blocking1.8b4? → blocking1.8b4-
Fixed by checkin for bug 296967
Status: NEW → RESOLVED
Closed: 19 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: