WebKit Bugzilla
Attachment 348320 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
bug-189037-20180828121354.patch (text/plain), 6.42 KB, created by
Sihui Liu
on 2018-08-28 12:13:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2018-08-28 12:13:54 PDT
Size:
6.42 KB
patch
obsolete
>Subversion Revision: 235427 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6694ed1bf6797ae0afc3814c83b20b2f7bf93b6c..582a4aca5dc572ebd35697264761046e48807950 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 NOBODY (OOPS!). >+ >+ * 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..4e69412f27327b89de5ee2008987e995dc3eb859 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -4573,8 +4573,8 @@ - (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()); >+ NSError* callbackError = [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]; >+ completionHandlerBlock(nil, callbackError); > } else > completionHandlerBlock(wrapper(*data), nil); > }); >@@ -4588,8 +4588,8 @@ - (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()); >+ NSError* callbackError = [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]; >+ completionHandlerBlock(nil, callbackError); > } else > completionHandlerBlock(wrapper(*data), nil); > }); >@@ -4602,8 +4602,8 @@ - (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()); >+ NSError* callbackError = [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]; >+ handler(nil, callbackError); > } else > handler(string, nil); > }); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index f7509116444599c491a07550cc2eaf464ce98f62..df5fad5564b4961abbb7094b867add18bd008008 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 NOBODY (OOPS!). >+ >+ * 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