bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

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

ASSIGNED
Unassigned

Status

()

Core
DOM
P5
normal
ASSIGNED
6 years ago
17 days ago

People

(Reporter: Ehsan, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
See bug 608669 comment 13 onwards.
(Reporter)

Updated

6 years ago
No longer blocks: 608669
(Reporter)

Updated

6 years ago
Blocks: 608669
(Reporter)

Comment 1

6 years ago
Created attachment 701185 [details] [diff] [review]
Patch (v1)
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-
(Reporter)

Comment 3

6 years ago
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.
(Reporter)

Comment 6

6 years ago
Created attachment 701940 [details] [diff] [review]
Patch (v2)
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-
(Reporter)

Comment 8

6 years ago
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.
(Reporter)

Comment 10

6 years ago
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
You need to log in before you can comment on or make changes to this bug.