Closed Bug 1032427 Opened 10 years ago Closed 9 years ago

Move docshell events to inner window only

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1182316

People

(Reporter: khuey, Assigned: khuey)

References

Details

Attachments

(1 file)

Attached patch Patch (deleted) — Splinter Review
This one is slightly tricky. There is (potentially) a behavior change here. Before if popstate caused a navigation we would end up firing the hashchange at the new inner window. That seems wrong to me, so I changed it.
Attachment #8448247 - Flags: review?(bugs)
Comment on attachment 8448247 [details] [diff] [review] Patch > // The event dispatch below can cause us to re-enter script and >- // destroy the docshell, nulling out mScriptGlobal. Hold a stack >- // reference to avoid null derefs. See bug 914521. >- nsRefPtr<nsGlobalWindow> win = mScriptGlobal; >- if (win) { >+ // destroy the docshell, nulling out mScriptGlobal or changing the >+ // inner window. Hold a stack reference to avoid null derefs. See >+ // bug 914521. >+ nsCOMPtr<nsPIDOMWindow> inner = >+ mScriptGlobal->GetCurrentInnerWindow(); Nothing guarantees mScriptGlobal is non-null here, at least in theory. So, null check.
Attachment #8448247 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: