Last Comment Bug 751999 - Split SetDocShell apart so it's easier to see what's going on.
: Split SetDocShell apart so it's easier to see what's going on.
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla15
Assigned To: Kyle Huey [:khuey] (khuey@mozilla.com)
:
Mentors:
Depends on: 752468
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-04 12:55 PDT by Kyle Huey [:khuey] (khuey@mozilla.com)
Modified: 2012-06-13 06:07 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (12.31 KB, patch)
2012-05-04 12:55 PDT, Kyle Huey [:khuey] (khuey@mozilla.com)
jst: review+
Details | Diff | Review

Description Kyle Huey [:khuey] (khuey@mozilla.com) 2012-05-04 12:55:13 PDT
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.
Comment 1 :Ms2ger 2012-05-04 14:00:08 PDT
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
Comment 2 Kyle Huey [:khuey] (khuey@mozilla.com) 2012-05-28 00:58:58 PDT
https://hg.mozilla.org/mozilla-central/rev/45a8b9f1a411

Note You need to log in before you can comment on or make changes to this bug.