Bug 93413

Summary: [WK2] MiniBrowser crashes on window.open()
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Tools / TestsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: hausmann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed fix mitz: review+

Description Alexey Proskuryakov 2012-08-07 17:07:04 PDT
Patch forthcoming.
Comment 1 Alexey Proskuryakov 2012-08-07 17:09:25 PDT
Created attachment 157049 [details]
proposed fix
Comment 2 Simon Hausmann 2012-08-08 01:29:43 PDT
Comment on attachment 157049 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=157049&action=review

> Tools/MiniBrowser/mac/WebBundle/WebBundleMain.m:48
>      LOG(@"WKBundlePageClient - didClearWindowForFrame %@", [(NSURL *)cfURL absoluteString]);
> -    CFRelease(cfURL);
> +    if (cfURL)
> +        CFRelease(cfURL);

Just out of curiousity, if cfURL can be a null pointer, isn't the previous call to absoluteString in the LOG line going to crash?
Comment 3 mitz 2012-08-08 09:26:44 PDT
Comment on attachment 157049 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=157049&action=review

>> Tools/MiniBrowser/mac/WebBundle/WebBundleMain.m:48
>> +        CFRelease(cfURL);
> 
> Just out of curiousity, if cfURL can be a null pointer, isn't the previous call to absoluteString in the LOG line going to crash?

It isn’t. Sending an Objective-C message to nil is safe.
Comment 4 Alexey Proskuryakov 2012-08-08 09:32:33 PDT
Committed <http://trac.webkit.org/changeset/125040>.