Consider immutable mScriptGlobalObject for documents




13 years ago
5 months ago


(Reporter: bzbarsky, Unassigned)


Dependency tree / graph

Firefox Tracking Flags

(Not tracked)




13 years ago
See comments in bug 296639.  Basically, I think that we should never null out
mScriptGlobalObject on documents; the inner window should just be owned by the
document.  Conceivably they should even share a refcount, though that's hard to
do with the cases where we reuse inner windows...


13 years ago
Blocks: 296639
I agree, this should make it possible for documents in the bfcache to be much
more 'alive' (although fiddeling with them too much will get them evicted from
the cache).

What mScriptGlobalObject should documents loaded from xmlhttprequest and the
likes get? The same as the 'owner document' or a new one?

Comment 2

13 years ago
That's a good question.  What script global and container, if any, should those
get?  Right now, loading via XMLHttpRequest sets no container or script global,
iirc.  Creating via DOMImplementation sets a container but no script global.

I'd say documents not attached to a window should have no container (which is
basically the docshell/outer_window) and documents that don't plan to run
scripts or dispatch events should have no script global.

So do we ever run scripts or dispatch mutation events or whatnot in such
documents?  Should we?
(In reply to comment #2)
> So do we ever run scripts or dispatch mutation events or whatnot in such
> documents?  Should we?

Bug 201236 for mutation events; I plan on dispatching events if they have a
mutation event listener, even if they lack a window.

Comment 4

13 years ago
*** Bug 308902 has been marked as a duplicate of this bug. ***


13 years ago
Blocks: 322726
Assignee: general → nobody
QA Contact: ian → general

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.