Title: [125040] trunk/Tools
Revision
125040
Author
[email protected]
Date
2012-08-08 09:32:05 -0700 (Wed, 08 Aug 2012)

Log Message

        [WK2] MiniBrowser crashes on window.open()
        https://bugs.webkit.org/show_bug.cgi?id=93413

        Reviewed by Dan Bernstein.

        * MiniBrowser/mac/BrowserWindowController.m: (createNewPage): This is a "create"
        API, so it needs to return a retained result.

        * MiniBrowser/mac/WebBundle/WebBundleMain.m: (didClearWindowObjectForFrame):
        When this function is called, URL appears to be poorly defined. Sometimes, it's
        the new URL, other times it's the old one. An "old" URL is null in a new page.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (125039 => 125040)


--- trunk/Tools/ChangeLog	2012-08-08 15:42:32 UTC (rev 125039)
+++ trunk/Tools/ChangeLog	2012-08-08 16:32:05 UTC (rev 125040)
@@ -1,3 +1,17 @@
+2012-08-08  Alexey Proskuryakov  <[email protected]>
+
+        [WK2] MiniBrowser crashes on window.open()
+        https://bugs.webkit.org/show_bug.cgi?id=93413
+
+        Reviewed by Dan Bernstein.
+
+        * MiniBrowser/mac/BrowserWindowController.m: (createNewPage): This is a "create"
+        API, so it needs to return a retained result.
+
+        * MiniBrowser/mac/WebBundle/WebBundleMain.m: (didClearWindowObjectForFrame):
+        When this function is called, URL appears to be poorly defined. Sometimes, it's
+        the new URL, other times it's the old one. An "old" URL is null in a new page.
+
 2012-08-08  Loïc Yhuel  <[email protected]>
 
         [Qt] Compile errors with OpenGLES2

Modified: trunk/Tools/MiniBrowser/mac/BrowserWindowController.m (125039 => 125040)


--- trunk/Tools/MiniBrowser/mac/BrowserWindowController.m	2012-08-08 15:42:32 UTC (rev 125039)
+++ trunk/Tools/MiniBrowser/mac/BrowserWindowController.m	2012-08-08 16:32:05 UTC (rev 125040)
@@ -412,7 +412,7 @@
     BrowserWindowController *controller = [[BrowserWindowController alloc] initWithContext:WKPageGetContext(page) pageGroup:WKPageGetPageGroup(page)];
     [controller loadWindow];
 
-    return controller->_webView.pageRef;
+    return WKRetain(controller->_webView.pageRef);
 }
 
 static void showPage(WKPageRef page, const void *clientInfo)

Modified: trunk/Tools/MiniBrowser/mac/WebBundle/WebBundleMain.m (125039 => 125040)


--- trunk/Tools/MiniBrowser/mac/WebBundle/WebBundleMain.m	2012-08-08 15:42:32 UTC (rev 125039)
+++ trunk/Tools/MiniBrowser/mac/WebBundle/WebBundleMain.m	2012-08-08 16:32:05 UTC (rev 125040)
@@ -44,7 +44,8 @@
     WKRelease(wkURL);
 
     LOG(@"WKBundlePageClient - didClearWindowForFrame %@", [(NSURL *)cfURL absoluteString]);
-    CFRelease(cfURL);
+    if (cfURL)
+        CFRelease(cfURL);
 
     WKStringRef messageName = WKStringCreateWithCFString(CFSTR("Callback"));
     WKStringRef messageBody = WKStringCreateWithCFString(CFSTR("Window was cleared"));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to