Nearly everything in the UIProcess "leaks" when WKWebView is torn down
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jul 2014 23:18:21 +0000 (23:18 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jul 2014 23:18:21 +0000 (23:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134699
<rdar://problem/17581777>

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Adoption is important!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170859 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

index 19afc5f995b4b1b9a13b1a4b2aa994ca78cc2811..d018e82b96ee0c9de0a2ee5a36cfa5ca562b12bd 100644 (file)
@@ -1,3 +1,15 @@
+2014-07-07  Tim Horton  <timothy_horton@apple.com>
+
+        Nearly everything in the UIProcess "leaks" when WKWebView is torn down
+        https://bugs.webkit.org/show_bug.cgi?id=134699
+        <rdar://problem/17581777>
+
+        Reviewed by Simon Fraser.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView initWithFrame:configuration:]):
+        Adoption is important!
+
 2014-07-07  Enrica Casucci  <enrica@apple.com>
 
         REGRESSION(iOS WK2): arrow keys movements don't work.
 2014-07-07  Enrica Casucci  <enrica@apple.com>
 
         REGRESSION(iOS WK2): arrow keys movements don't work.
index cba457f853064e7a54f2ebd8de2ef13b4ea5f1bc..b15f858b9c3b3f84accfad191d9aa354521aca96 100644 (file)
@@ -305,7 +305,7 @@ static int32_t deviceOrientation()
 #endif
 
 #if PLATFORM(MAC)
 #endif
 
 #if PLATFORM(MAC)
-    _wkView = [[WKView alloc] initWithFrame:bounds context:context configuration:WTF::move(webPageConfiguration) webView:self];
+    _wkView = adoptNS([[WKView alloc] initWithFrame:bounds context:context configuration:WTF::move(webPageConfiguration) webView:self]);
     [self addSubview:_wkView.get()];
     _page = WebKit::toImpl([_wkView pageRef]);
 
     [self addSubview:_wkView.get()];
     _page = WebKit::toImpl([_wkView pageRef]);