Changeset 250785 in webkit


Ignore:
Timestamp:
Oct 7, 2019 1:31:01 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Crash in WebKitTestRunnerApp: invocation function for block in WTR::UIScriptControllerIOS::sendEventStream
https://bugs.webkit.org/show_bug.cgi?id=202646
<rdar://problem/54576522>

Patch by Antoine Quint <Antoine Quint> on 2019-10-07
Reviewed by Tim Horton.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::sendEventStream):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r250784 r250785  
     12019-10-07  Antoine Quint  <graouts@apple.com>
     2
     3        Crash in WebKitTestRunnerApp: invocation function for block in WTR::UIScriptControllerIOS::sendEventStream
     4        https://bugs.webkit.org/show_bug.cgi?id=202646
     5        <rdar://problem/54576522>
     6
     7        Reviewed by Tim Horton.
     8
     9        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
     10        (WTR::UIScriptControllerIOS::sendEventStream):
     11
    1122019-10-07  Jonathan Bedard  <jbedard@apple.com>
    213
  • trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm

    r249431 r250785  
    4444#import <WebKit/WebKit.h>
    4545#import <pal/spi/ios/GraphicsServicesSPI.h>
     46#import <wtf/BlockPtr.h>
    4647#import <wtf/SoftLinking.h>
    4748#import <wtf/Vector.h>
     
    426427        return;
    427428    }
    428    
    429     [[HIDEventGenerator sharedHIDEventGenerator] sendEventStream:eventInfo completionBlock:^{
    430         if (!m_context)
    431             return;
    432         m_context->asyncTaskComplete(callbackID);
    433     }];
     429
     430    auto completion = makeBlockPtr([this, protectedThis = makeRefPtr(*this), callbackID] {
     431        if (!m_context)
     432            return;
     433        m_context->asyncTaskComplete(callbackID);
     434    });
     435
     436    [[HIDEventGenerator sharedHIDEventGenerator] sendEventStream:eventInfo completionBlock:completion.get()];
    434437}
    435438
Note: See TracChangeset for help on using the changeset viewer.