Title: [179161] trunk
Revision
179161
Author
[email protected]
Date
2015-01-26 18:39:44 -0800 (Mon, 26 Jan 2015)

Log Message

[iOS WK2] Fix possible crash when -[WKWebView evaluateJavaScript:completionHandler:] was called then the WKWebView is destroyed
https://bugs.webkit.org/show_bug.cgi?id=140203
rdar://problem/19198492

Reviewed by Sam Weinig.
Source/WebKit2:

When handling the OwnerWasInvalidated case in -[WKWebView evaluateJavaScript:completionHandler:],
the block passed to dispatch_async() needs to be retained. Fix by passing the RefPtr
to the lambda.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewEvaluateJavaScript.mm: Added.
(TEST):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (179160 => 179161)


--- trunk/Source/WebKit2/ChangeLog	2015-01-27 02:39:42 UTC (rev 179160)
+++ trunk/Source/WebKit2/ChangeLog	2015-01-27 02:39:44 UTC (rev 179161)
@@ -1,3 +1,18 @@
+2015-01-26  Simon Fraser  <[email protected]>
+
+        [iOS WK2] Fix possible crash when -[WKWebView evaluateJavaScript:completionHandler:] was called then the WKWebView is destroyed
+        https://bugs.webkit.org/show_bug.cgi?id=140203
+        rdar://problem/19198492
+
+        Reviewed by Sam Weinig.
+        
+        When handling the OwnerWasInvalidated case in -[WKWebView evaluateJavaScript:completionHandler:],
+        the block passed to dispatch_async() needs to be retained. Fix by passing the RefPtr
+        to the lambda.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView evaluateJavaScript:completionHandler:]):
+
 2015-01-26  Chris Dumez  <[email protected]>
 
         Rename Document::body() to Document::bodyOrFrameset() for clarity

Modified: trunk/Tools/ChangeLog (179160 => 179161)


--- trunk/Tools/ChangeLog	2015-01-27 02:39:42 UTC (rev 179160)
+++ trunk/Tools/ChangeLog	2015-01-27 02:39:44 UTC (rev 179161)
@@ -1,3 +1,15 @@
+2015-01-26  Simon Fraser  <[email protected]>
+
+        [iOS WK2] Fix possible crash when -[WKWebView evaluateJavaScript:completionHandler:] was called then the WKWebView is destroyed
+        https://bugs.webkit.org/show_bug.cgi?id=140203
+        rdar://problem/19198492
+
+        Reviewed by Sam Weinig.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewEvaluateJavaScript.mm: Added.
+        (TEST):
+
 2015-01-26  David Kilzer  <[email protected]>
 
         Add iOS EWS to build.webkit.org/dashboard
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to