Bug 19541

Summary: Null pointer in showModalDialog()
Product: WebKit Reporter: danceoffwithyourpantsoff <danceoffwithyourpantsoff>
Component: JavaScriptCoreAssignee: Cameron Zwarich (cpst) <zwarich>
Status: RESOLVED FIXED    
Severity: Normal CC: zwarich
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
URL: http://danceoffwithyourpantsoff.googlepages.com/empty-page.html
Attachments:
Description Flags
Proposed patch darin: review+

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.