Split SetDocShell apart so it's easier to see what's going on.

RESOLVED FIXED in mozilla15

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: khuey, Assigned: khuey)

Tracking

unspecified
mozilla15
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 621136 [details] [diff] [review]
Patch

nsGlobalWindow::SetDocShell does two very different things, depending on whether it gets called with a null or a non-null docshell.  Having two separate functions makes it easier to read, imo.
Attachment #621136 - Flags: review?(jst)
Comment on attachment 621136 [details] [diff] [review]
Patch

Review of attachment 621136 [details] [diff] [review]:
-----------------------------------------------------------------

I like!

::: dom/base/nsGlobalWindow.cpp
@@ +2240,5 @@
> +    if (parentWindow.get() != static_cast<nsIDOMWindow*>(this)) {
> +      nsCOMPtr<nsPIDOMWindow> piWindow(do_QueryInterface(parentWindow));
> +      mChromeEventHandler = piWindow->GetChromeEventHandler();
> +    }
> +    else {

} else {

@@ +2253,5 @@
> +
> +void
> +nsGlobalWindow::DetachFromDocShell()
> +{
> +  NS_ASSERTION(IsOuterWindow(), "Uh, SetDocShell() called on inner window!");

Fix message

Updated

5 years ago
Attachment #621136 - Flags: review?(jst) → review+
https://hg.mozilla.org/mozilla-central/rev/45a8b9f1a411
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Depends on: 752468
You need to log in before you can comment on or make changes to this bug.