Title: [87225] branches/safari-534-branch/Source/WebKit2

Diff

Modified: branches/safari-534-branch/Source/WebKit2/ChangeLog (87224 => 87225)


--- branches/safari-534-branch/Source/WebKit2/ChangeLog	2011-05-24 23:01:24 UTC (rev 87224)
+++ branches/safari-534-branch/Source/WebKit2/ChangeLog	2011-05-24 23:03:39 UTC (rev 87225)
@@ -1,5 +1,36 @@
 2011-05-24  Lucas Forschler  <[email protected]>
 
+    Merged r87113.
+
+    2011-05-23  Jeremy Noble  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r86990:86992): World leak when all windows closed
+        https://bugs.webkit.org/show_bug.cgi?id=61311
+
+        Three interlocking problems:
+        
+        1) Calling [WKView fullScreenController] will create the controller if it doesn't all ready
+        exist, so move the closing code into WKView, where we can bail early if there isn't a 
+        controller.
+        
+        2) A retain-cycle exists between WKView and WKFullScreenWindowController.  Make sure to break
+        the cycle explicitly by clearing the _fullScreenWindowController ivar when closing the
+        controller.
+        
+        3) [NSWindowController close] was overridden without calling [super close].  Do that.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView closeFullScreenWindowController]): Moved here from WebFullScreenManagerProxyMac.mm.
+        * UIProcess/API/mac/WKViewInternal.h:
+        * UIProcess/mac/WKFullScreenWindowController.mm:
+        (-[WKFullScreenWindowController close]): Call [super close].
+        * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
+        (WebKit::WebFullScreenManagerProxy::invalidate):
+
+2011-05-24  Lucas Forschler  <[email protected]>
+
     Merged r87093.
 
     2011-05-23  Sam Weinig  <[email protected]>

Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm (87224 => 87225)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm	2011-05-24 23:01:24 UTC (rev 87224)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm	2011-05-24 23:03:39 UTC (rev 87225)
@@ -2424,6 +2424,14 @@
     }
     return _data->_fullScreenWindowController.get();
 }
+
+- (void)closeFullScreenWindowController
+{
+    if (!_data->_fullScreenWindowController)
+        return;
+    [_data->_fullScreenWindowController.get() close];
+    _data->_fullScreenWindowController = nullptr;
+}
 #endif
 
 - (bool)_executeSavedCommandBySelector:(SEL)selector

Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (87224 => 87225)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h	2011-05-24 23:01:24 UTC (rev 87224)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h	2011-05-24 23:03:39 UTC (rev 87225)
@@ -84,6 +84,7 @@
 
 #if ENABLE(FULLSCREEN_API)
 - (WKFullScreenWindowController*)fullScreenWindowController;
+- (void)closeFullScreenWindowController;
 #endif
 
 - (void)_cacheWindowBottomCornerRect;

Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (87224 => 87225)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm	2011-05-24 23:01:24 UTC (rev 87224)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm	2011-05-24 23:03:39 UTC (rev 87225)
@@ -435,6 +435,8 @@
     
     if (_isExitingFullScreen)
         [self finishedExitFullScreenAnimation:YES];
+
+    [super close];
 }
 
 #pragma mark -

Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm (87224 => 87225)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm	2011-05-24 23:01:24 UTC (rev 87224)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm	2011-05-24 23:03:39 UTC (rev 87225)
@@ -40,7 +40,7 @@
     if (!m_webView)
         return;
     
-    [[m_webView fullScreenWindowController] close];
+    [m_webView closeFullScreenWindowController];
     m_webView = 0;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to