WebKit Bugzilla
Attachment 348338 Details for
Bug 189037
: Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-189037-20180828134801.patch (text/plain), 6.26 KB, created by
Sihui Liu
on 2018-08-28 13:48:02 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2018-08-28 13:48:02 PDT
Size:
6.26 KB
patch
obsolete
>Subversion Revision: 235427 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6694ed1bf6797ae0afc3814c83b20b2f7bf93b6c..75abe1457ef4fe8fcb7f32405dac0cb84c525dcf 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,15 @@ >+2018-08-28 Sihui Liu <sihui_liu@apple.com> >+ >+ Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback >+ https://bugs.webkit.org/show_bug.cgi?id=189037 >+ >+ Reviewed by Chris Dumez. >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _getMainResourceDataWithCompletionHandler:]): >+ (-[WKWebView _getWebArchiveDataWithCompletionHandler:]): >+ (-[WKWebView _getContentsAsStringWithCompletionHandler:]): >+ > 2018-08-28 Aditya Keerthi <akeerthi@apple.com> > > [Datalist] Pressing enter without a selected option shouldn't change the input >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index 69ee3d396f8c2645d54840a535fe9ebc2c5a3fa7..e5f40f7e107261005284635fc63d2029637abf3f 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -4573,8 +4573,7 @@ - (void)_getMainResourceDataWithCompletionHandler:(void (^)(NSData *, NSError *) > void (^completionHandlerBlock)(NSData *, NSError *) = (void (^)(NSData *, NSError *))handler.get(); > if (error != WebKit::CallbackBase::Error::None) { > // FIXME: Pipe a proper error in from the WebPageProxy. >- RetainPtr<NSError> error = adoptNS([[NSError alloc] init]); >- completionHandlerBlock(nil, error.get()); >+ completionHandlerBlock(nil, [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]); > } else > completionHandlerBlock(wrapper(*data), nil); > }); >@@ -4588,8 +4587,7 @@ - (void)_getWebArchiveDataWithCompletionHandler:(void (^)(NSData *, NSError *))c > void (^completionHandlerBlock)(NSData *, NSError *) = (void (^)(NSData *, NSError *))handler.get(); > if (error != WebKit::CallbackBase::Error::None) { > // FIXME: Pipe a proper error in from the WebPageProxy. >- RetainPtr<NSError> error = adoptNS([[NSError alloc] init]); >- completionHandlerBlock(nil, error.get()); >+ completionHandlerBlock(nil, [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]); > } else > completionHandlerBlock(wrapper(*data), nil); > }); >@@ -4602,8 +4600,7 @@ - (void)_getContentsAsStringWithCompletionHandler:(void (^)(NSString *, NSError > _page->getContentsAsString([handler](String string, WebKit::CallbackBase::Error error) { > if (error != WebKit::CallbackBase::Error::None) { > // FIXME: Pipe a proper error in from the WebPageProxy. >- RetainPtr<NSError> error = adoptNS([[NSError alloc] init]); >- handler(nil, error.get()); >+ handler(nil, [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]); > } else > handler(string, nil); > }); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index f7509116444599c491a07550cc2eaf464ce98f62..f3f833aeef05cc25200eb4345a30e208b44ff889 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,13 @@ >+2018-08-28 Sihui Liu <sihui_liu@apple.com> >+ >+ Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback >+ https://bugs.webkit.org/show_bug.cgi?id=189037 >+ >+ Reviewed by Chris Dumez. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: >+ (TEST): >+ > 2018-08-27 Wenson Hsieh <wenson_hsieh@apple.com> > > [Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm >index 4050ebd39bf8e41870da245164839e3590348fa4..6bdd532664859c854cf44f2ca54e2535c93141b3 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm >@@ -229,38 +229,44 @@ TEST(WKNavigation, ProcessCrashDuringCallback) > > __block WKWebView *view = webView.get(); > [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) { >- EXPECT_TRUE(!!error); >+ if (!!error) >+ EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code); > ++callbackCount; > if (callbackCount == 6) > calledAllCallbacks = true; > }]; > [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) { >- EXPECT_TRUE(!!error); >+ if (!!error) >+ EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code); > ++callbackCount; > if (callbackCount == 6) > calledAllCallbacks = true; > }]; > [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) { >- EXPECT_TRUE(!!error); >+ if (!!error) >+ EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code); > [view _close]; // Calling _close will also invalidate all callbacks. > ++callbackCount; > if (callbackCount == 6) > calledAllCallbacks = true; > }]; > [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) { >- EXPECT_TRUE(!!error); >+ if (!!error) >+ EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code); > ++callbackCount; > if (callbackCount == 6) > calledAllCallbacks = true; > }]; > [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) { >- EXPECT_TRUE(!!error); >+ if (!!error) >+ EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code); > ++callbackCount; > if (callbackCount == 6) > calledAllCallbacks = true; > }]; > [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) { >- EXPECT_TRUE(!!error); >+ if (!!error) >+ EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code); > ++callbackCount; > if (callbackCount == 6) > calledAllCallbacks = true;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189037
:
348242
|
348304
|
348320
| 348338