Bug 93413 - [WK2] MiniBrowser crashes on window.open()
Summary: [WK2] MiniBrowser crashes on window.open()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-07 17:07 PDT by Alexey Proskuryakov
Modified: 2012-08-08 09:32 PDT (History)
1 user (show)

See Also:


Attachments
proposed fix (2.19 KB, patch)
2012-08-07 17:09 PDT, Alexey Proskuryakov
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.