Bug 19541 - Null pointer in showModalDialog()
Summary: Null pointer in showModalDialog()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Cameron Zwarich (cpst)
URL: http://danceoffwithyourpantsoff.googl...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-06-13 17:38 PDT by danceoffwithyourpantsoff
Modified: 2008-11-09 17:19 PST (History)
1 user (show)

See Also:


Attachments
Proposed patch (4.14 KB, patch)
2008-11-09 17:03 PST, Cameron Zwarich (cpst)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description danceoffwithyourpantsoff 2008-06-13 17:38:50 PDT
A frame can out live it's page, for example when a frame is detached (so pageDestroyed() is called).  We could still have a reference to the window from javascript.

The patch is simple to check !frame and !frame->page()
Comment 1 Mark Rowe (bdash) 2008-06-13 23:21:05 PDT
<rdar://problem/6008014>
Comment 2 Cameron Zwarich (cpst) 2008-11-07 17:40:23 PST
This shouldn't be hard to fix.
Comment 3 Cameron Zwarich (cpst) 2008-11-09 17:03:02 PST
Created attachment 25010 [details]
Proposed patch
Comment 4 Darin Adler 2008-11-09 17:05:16 PST
Comment on attachment 25010 [details]
Proposed patch

I prefer to do page && page->chrome()->canRunModal() instead of a separate if statement.

r=me
Comment 5 Cameron Zwarich (cpst) 2008-11-09 17:19:48 PST
Landed in r38248.