Last Comment Bug 760047 - Don't handle a null aDocument in nsGlobalWindow::SetNewDocument
: Don't handle a null aDocument in nsGlobalWindow::SetNewDocument
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-31 03:51 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-06-06 03:26 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (3.57 KB, patch)
2012-05-31 03:51 PDT, :Ms2ger (⌚ UTC+1/+2)
mounir: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-05-31 03:51:06 PDT
Created attachment 628665 [details] [diff] [review]
Patch v1

All the callers null-check the document they pass, so we might as well just assert that it isn't null.
Comment 1 Mounir Lamouri (:mounir) 2012-05-31 05:13:20 PDT
Comment on attachment 628665 [details] [diff] [review]
Patch v1

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

I guess nsGlobalModalWindow::SetNewDocument() can't get a |null| aDocument too, right? Could you add a check there and also remove the condition for |mReturnValue = nsnull;|.

r=me with that.
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-06-06 03:26:57 PDT
https://hg.mozilla.org/mozilla-central/rev/fbcca1b454a2

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