Open Bug 795961 Opened 12 years ago Updated 2 years ago

chrome-document-global-created may fire for the initial about:blank load in a docshell

Categories

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

x86
macOS
defect

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

No longer blocks: 608669
Blocks: 608669
Attached patch Patch (v1) (obsolete) (deleted) — Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #701185 - Flags: review?(jonas)
Comment on attachment 701185 [details] [diff] [review] Patch (v1) You're not checking that the about:blank is the initial about:blank document. (And IMO this is wrong approach anyway. What if there won't be anything else but the initial document. )
Attachment #701185 - Flags: review?(jonas) → review-
How can I check for whether this is the initial about:blank?
(In reply to :Ehsan Akhgari from comment #3) > How can I check for whether this is the initial about:blank? nsIDocument::IsInitialDocument().
IIRC, the parser-created about:blank isn’t considered “initial”. The docshell created doc is. Here be dragons.
Attached patch Patch (v2) (deleted) — Splinter Review
Attachment #701185 - Attachment is obsolete: true
Attachment #701940 - Flags: review?(bugs)
Comment on attachment 701940 [details] [diff] [review] Patch (v2) I still don't understand this. We should notify about *-document-global-created when such global is created. There are cases when stop is called immediately after creating an iframe.
Attachment #701940 - Flags: review?(bugs) → review-
OK, I give up. Please see bug 608669 comment 15 on what kinds of problems the current code creates. If you open a new browser window for example, you do not expect to receive a notification for about:blank. I'll leave it to Benoit to figure out what you want to see happen here, but the current behavior is clearly wrong.
Assignee: ehsan → nobody
I would not be at all surprised if this turned out to be unfixable without fixing bug 543435 first.
Bug 829360 is another example where we were about to put some bugs in Firefox by using chrome-document-global-created.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
No assignee, updating the status.
Status: ASSIGNED → NEW
No assignee, updating the status.
No assignee, updating the status.
No assignee, updating the status.
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: