Changeset 190819 in webkit


Ignore:
Timestamp:
Oct 9, 2015 2:34:56 PM (9 years ago)
Author:
Simon Fraser
Message:

[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]):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r190805 r190819  
     12015-10-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [iOS WK2] Fix some leaks in TestRunnerWKWebView and UIScriptContext
     4        https://bugs.webkit.org/show_bug.cgi?id=149960
     5
     6        Reviewed by Tim Horton.
     7       
     8        Use adoptWK(), and null out some members (file is not using ARC).
     9
     10        * WebKitTestRunner/UIScriptContext/UIScriptContext.cpp:
     11        (UIScriptContext::uiScriptComplete):
     12        * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
     13        (-[TestRunnerWKWebView dealloc]):
     14
    1152015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
    216
  • trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp

    r190368 r190819  
    139139void UIScriptContext::uiScriptComplete(JSStringRef result)
    140140{
    141     WKRetainPtr<WKStringRef> uiScriptResult = WKStringCreateWithJSString(result);
     141    WKRetainPtr<WKStringRef> uiScriptResult = adoptWK(WKStringCreateWithJSString(result));
    142142    m_delegate.uiScriptDidComplete(uiScriptResult.get(), m_currentScriptCallbackID);
    143143    m_currentScriptCallbackID = 0;
  • trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm

    r190517 r190819  
    7171- (void)dealloc
    7272{
     73    [[NSNotificationCenter defaultCenter] removeObserver:self];
     74
     75    self.willBeginZoomingCallback = nil;
     76    self.didEndZoomingCallback = nil;
     77    self.didShowKeyboardCallback = nil;
     78    self.didHideKeyboardCallback = nil;
     79
     80    self.zoomToScaleCompletionHandler = nil;
     81    self.showKeyboardCompletionHandler = nil;
     82
    7383    [super dealloc];
    74     [[NSNotificationCenter defaultCenter] removeObserver:self];
    7584}
    7685
Note: See TracChangeset for help on using the changeset viewer.