Changeset 240828 in webkit


Ignore:
Timestamp:
Jan 31, 2019 4:34:58 PM (5 years ago)
Author:
jiewen_tan@apple.com
Message:

Unreviewed, build fix after r240805

This patch reverts the BlockPtr change since it breaks iOS builds.

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::tryInterceptNavigation):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r240818 r240828  
     12019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Unreviewed, build fix after r240805
     4
     5        This patch reverts the BlockPtr change since it breaks iOS builds.
     6
     7        * UIProcess/Cocoa/NavigationState.mm:
     8        (WebKit::tryInterceptNavigation):
     9
    1102019-01-31  Chris Dumez  <cdumez@apple.com>
    211
  • trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm

    r240805 r240828  
    480480#if HAVE(APP_LINKS)
    481481    if (navigationAction->shouldOpenAppLinks()) {
    482         auto callback = makeBlockPtr([request = navigationAction->request().isolatedCopy(), weakPage = makeWeakPtr(page), completionHandler = WTFMove(completionHandler)] (BOOL success, NSError *) mutable {
    483             RunLoop::main().dispatch([request = request.isolatedCopy(), weakPage, completionHandler = WTFMove(completionHandler), success]() mutable {
    484                 if (!success && weakPage) {
    485                     tryOptimizingLoad(request, *weakPage, WTFMove(completionHandler));
    486                     return;
    487                 }
    488                 completionHandler(success);
     482        auto* localCompletionHandler = new WTF::Function<void (bool)>([request = navigationAction->request().isolatedCopy(), weakPage = makeWeakPtr(page), completionHandler = WTFMove(completionHandler)] (bool success) mutable {
     483            ASSERT(RunLoop::isMain());
     484            if (!success && weakPage) {
     485                tryOptimizingLoad(request, *weakPage, WTFMove(completionHandler));
     486                return;
     487            }
     488            completionHandler(success);
     489        });
     490        [LSAppLink openWithURL:navigationAction->request().url() completionHandler:[localCompletionHandler](BOOL success, NSError *) {
     491            dispatch_async(dispatch_get_main_queue(), [localCompletionHandler, success] {
     492                (*localCompletionHandler)(success);
     493                delete localCompletionHandler;
    489494            });
    490         });
    491         [LSAppLink openWithURL:navigationAction->request().url() completionHandler:callback.get()];
     495        }];
    492496        return;
    493497    }
Note: See TracChangeset for help on using the changeset viewer.