https://bugs.webkit.org/show_bug.cgi?id=149960
Reviewed by Tim Horton.
Use adoptWK(), and null out some members (file is not using ARC).
* WebKitTestRunner/UIScriptContext/UIScriptContext.cpp:
(UIScriptContext::uiScriptComplete):
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView dealloc]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190819
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-10-09 Simon Fraser <simon.fraser@apple.com>
+
+ [iOS WK2] Fix some leaks in TestRunnerWKWebView and UIScriptContext
+ https://bugs.webkit.org/show_bug.cgi?id=149960
+
+ Reviewed by Tim Horton.
+
+ Use adoptWK(), and null out some members (file is not using ARC).
+
+ * WebKitTestRunner/UIScriptContext/UIScriptContext.cpp:
+ (UIScriptContext::uiScriptComplete):
+ * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
+ (-[TestRunnerWKWebView dealloc]):
+
2015-10-09 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE_SUID_SANDBOX_LINUX cruft
void UIScriptContext::uiScriptComplete(JSStringRef result)
{
- WKRetainPtr<WKStringRef> uiScriptResult = WKStringCreateWithJSString(result);
+ WKRetainPtr<WKStringRef> uiScriptResult = adoptWK(WKStringCreateWithJSString(result));
m_delegate.uiScriptDidComplete(uiScriptResult.get(), m_currentScriptCallbackID);
m_currentScriptCallbackID = 0;
}
- (void)dealloc
{
- [super dealloc];
[[NSNotificationCenter defaultCenter] removeObserver:self];
+
+ self.willBeginZoomingCallback = nil;
+ self.didEndZoomingCallback = nil;
+ self.didShowKeyboardCallback = nil;
+ self.didHideKeyboardCallback = nil;
+
+ self.zoomToScaleCompletionHandler = nil;
+ self.showKeyboardCompletionHandler = nil;
+
+ [super dealloc];
}
- (void)zoomToScale:(double)scale animated:(BOOL)animated completionHandler:(void (^)(void))completionHandler