Closed Bug 751999 Opened 12 years ago Closed 12 years ago

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

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: khuey, Assigned: khuey)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
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
Attachment #621136 - Flags: review?(jst) → review+
https://hg.mozilla.org/mozilla-central/rev/45a8b9f1a411
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.