Changeset 179160 in webkit
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r178949 r179160 578 578 return; 579 579 580 auto completionHandler = (void (^)(id, NSError *))handler.get();581 582 580 if (errorCode != WebKit::ScriptValueCallback::Error::None) { 583 581 auto error = createNSError(callbackErrorCode(errorCode)); … … 586 584 // because that can trigger re-entrancy bugs in WebKit. 587 585 // FIXME: It would be even better if GenericCallback did this for us. 588 dispatch_async(dispatch_get_main_queue(), [completionHandler, error] { 589 completionHandler(nil, error.get()); 586 dispatch_async(dispatch_get_main_queue(), [handler, error] { 587 auto rawHandler = (void (^)(id, NSError *))handler.get(); 588 rawHandler(nil, error.get()); 590 589 }); 591 590 return; 592 591 } 593 592 594 completionHandler(nil, error.get()); 593 auto rawHandler = (void (^)(id, NSError *))handler.get(); 594 rawHandler(nil, error.get()); 595 595 return; 596 596 } 597 597 598 auto rawHandler = (void (^)(id, NSError *))handler.get(); 598 599 if (!serializedScriptValue) { 599 completionHandler(nil, createNSError(WKErrorJavaScriptExceptionOccurred).get());600 rawHandler(nil, createNSError(WKErrorJavaScriptExceptionOccurred).get()); 600 601 return; 601 602 } … … 605 606 JSValue *value = [JSValue valueWithJSValueRef:valueRef inContext:context.get()]; 606 607 607 completionHandler([value toObject], nil);608 rawHandler([value toObject], nil); 608 609 }); 609 610 } -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r178618 r179160 11 11 0F139E781A423A6B00F590F5 /* PlatformUtilitiesCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */; }; 12 12 0F139E791A42457000F590F5 /* PlatformUtilitiesCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */; }; 13 0F3B94A71A77267400DE3272 /* WKWebViewEvaluateJavaScript.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F3B94A51A77266C00DE3272 /* WKWebViewEvaluateJavaScript.mm */; }; 13 14 1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; }; 14 15 1A50AA201A2A51FC00F4C345 /* close-from-within-create-page.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A50AA1F1A2A4EA500F4C345 /* close-from-within-create-page.html */; }; … … 387 388 0F139E751A423A5300F590F5 /* WeakObjCPtr.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WeakObjCPtr.mm; path = cocoa/WeakObjCPtr.mm; sourceTree = "<group>"; }; 388 389 0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreStatisticsWithNoWebProcess.cpp; sourceTree = "<group>"; }; 390 0F3B94A51A77266C00DE3272 /* WKWebViewEvaluateJavaScript.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewEvaluateJavaScript.mm; sourceTree = "<group>"; }; 389 391 0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RedBlackTree.cpp; sourceTree = "<group>"; }; 390 392 0FC6C4CE141034AD005B7F0C /* MetaAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MetaAllocator.cpp; sourceTree = "<group>"; }; … … 791 793 C95501BE19AD2FAF0049BE3E /* Preferences.mm */, 792 794 7CC3E1FA197E234100BE6252 /* UserContentController.mm */, 795 0F3B94A51A77266C00DE3272 /* WKWebViewEvaluateJavaScript.mm */, 793 796 ); 794 797 name = "WebKit2 Cocoa"; … … 1357 1360 7CCE7EAC1A411A3400447C4C /* Counters.cpp in Sources */, 1358 1361 7CCE7EDB1A411A9200447C4C /* CSSParser.cpp in Sources */, 1362 0F3B94A71A77267400DE3272 /* WKWebViewEvaluateJavaScript.mm in Sources */, 1359 1363 7CCE7F321A411B8E00447C4C /* CString.cpp in Sources */, 1360 1364 7CCE7F291A411B1000447C4C /* CustomProtocolsInvalidScheme.mm in Sources */,
Note:
See TracChangeset
for help on using the changeset viewer.