WebKit Bugzilla
Attachment 347913 Details for
Bug 188880
: Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-188880-20180823000412.patch (text/plain), 10.37 KB, created by
Ryosuke Niwa
on 2018-08-23 00:04:13 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Ryosuke Niwa
Created:
2018-08-23 00:04:13 PDT
Size:
10.37 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 235213) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2018-08-22 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated >+ https://bugs.webkit.org/show_bug.cgi?id=188880 >+ >+ Reviewed by Saam Barati. >+ >+ Removed the debug assertion. WebContent process might be asking this network process >+ to unregister a blob registered from another network processs which had since crashed. >+ >+ We could keep track of which blob had been registered with which network process >+ in WebContent process and avoid sending IPC to the network process but that's a lot of >+ house-keeping for virtually no benefit other than not hitting this assertion. >+ >+ * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: >+ (WebKit::NetworkBlobRegistry::unregisterBlobURL): >+ > 2018-08-22 John Wilander <wilander@apple.com> > > The Storage Access API prompt should show the eTLD+1s, not the full host names >Index: Source/WebKit/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp (revision 235213) >+++ Source/WebKit/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp (working copy) >@@ -122,7 +122,6 @@ void NetworkBlobRegistry::unregisterBlob > > blobRegistry().unregisterBlobURL(url); > >- ASSERT(mapIterator->value.contains(url)); > mapIterator->value.remove(url); > } > >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 235216) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2018-08-22 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated >+ https://bugs.webkit.org/show_bug.cgi?id=188880 >+ >+ Reviewed by Saam Barati. >+ >+ Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess >+ were asynchronously terminating respective processes. Do so synchronously so that we can deterministically >+ test WebKit's behavior in layout tests. >+ >+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp: >+ (WTR::TestRunner::terminateNetworkProcess): >+ (WTR::TestRunner::terminateServiceWorkerProcess): >+ (WTR::TestRunner::terminateStorageProcess): >+ * WebKitTestRunner/TestInvocation.cpp: >+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): >+ (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): >+ > 2018-08-22 Wenson Hsieh <wenson_hsieh@apple.com> > > [Attachment Support] Support dragging attachment elements out as files on macOS >Index: Tools/WebKitTestRunner/TestInvocation.cpp >=================================================================== >--- Tools/WebKitTestRunner/TestInvocation.cpp (revision 235213) >+++ Tools/WebKitTestRunner/TestInvocation.cpp (working copy) >@@ -735,24 +735,6 @@ void TestInvocation::didReceiveMessageFr > return; > } > >- if (WKStringIsEqualToUTF8CString(messageName, "TerminateStorageProcess")) { >- ASSERT(!messageBody); >- TestController::singleton().terminateStorageProcess(); >- return; >- } >- >- if (WKStringIsEqualToUTF8CString(messageName, "TerminateNetworkProcess")) { >- ASSERT(!messageBody); >- TestController::singleton().terminateNetworkProcess(); >- return; >- } >- >- if (WKStringIsEqualToUTF8CString(messageName, "TerminateServiceWorkerProcess")) { >- ASSERT(!messageBody); >- TestController::singleton().terminateServiceWorkerProcess(); >- return; >- } >- > if (WKStringIsEqualToUTF8CString(messageName, "RunUIProcessScript")) { > WKDictionaryRef messageBodyDictionary = static_cast<WKDictionaryRef>(messageBody); > WKRetainPtr<WKStringRef> scriptKey(AdoptWK, WKStringCreateWithUTF8CString("Script")); >@@ -1435,6 +1417,24 @@ WKRetainPtr<WKTypeRef> TestInvocation::d > return nullptr; > } > >+ if (WKStringIsEqualToUTF8CString(messageName, "TerminateStorageProcess")) { >+ ASSERT(!messageBody); >+ TestController::singleton().terminateStorageProcess(); >+ return nullptr; >+ } >+ >+ if (WKStringIsEqualToUTF8CString(messageName, "TerminateNetworkProcess")) { >+ ASSERT(!messageBody); >+ TestController::singleton().terminateNetworkProcess(); >+ return nullptr; >+ } >+ >+ if (WKStringIsEqualToUTF8CString(messageName, "TerminateServiceWorkerProcess")) { >+ ASSERT(!messageBody); >+ TestController::singleton().terminateServiceWorkerProcess(); >+ return nullptr; >+ } >+ > ASSERT_NOT_REACHED(); > return nullptr; > } >Index: Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp >=================================================================== >--- Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (revision 235213) >+++ Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (working copy) >@@ -1236,19 +1236,19 @@ void TestRunner::setShouldDownloadUndisp > void TestRunner::terminateNetworkProcess() > { > WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("TerminateNetworkProcess")); >- WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr); >+ WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr, nullptr); > } > > void TestRunner::terminateServiceWorkerProcess() > { > WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("TerminateServiceWorkerProcess")); >- WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr); >+ WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr, nullptr); > } > > void TestRunner::terminateStorageProcess() > { > WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("TerminateStorageProcess")); >- WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr); >+ WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr, nullptr); > } > > static unsigned nextUIScriptCallbackID() >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 235220) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2018-08-22 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated >+ https://bugs.webkit.org/show_bug.cgi?id=188880 >+ >+ Reviewed by Saam Barati. >+ >+ Added a layout test which demonstrates this debug assertion. >+ >+ * TestExpectations: >+ * fast/files/blob-network-process-crash-expected.txt: Added. >+ * fast/files/blob-network-process-crash.html: Added. >+ * platform/wk2/TestExpectations: >+ > 2018-08-22 John Wilander <wilander@apple.com> > > Further adjustments to http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html >Index: LayoutTests/TestExpectations >=================================================================== >--- LayoutTests/TestExpectations (revision 235213) >+++ LayoutTests/TestExpectations (working copy) >@@ -389,6 +389,9 @@ http/tests/xmlhttprequest/gzip-content-t > # Only supported in WebKit2. > http/wpt/cross-origin-resource-policy/ [ Skip ] > >+# testRunner.terminateNetworkProcess() only works in WebKit2 >+fast/files/blob-network-process-crash.html [ Skip ] >+ > #////////////////////////////////////////////////////////////////////////////////////////// > # End platform-specific tests. > #////////////////////////////////////////////////////////////////////////////////////////// >Index: LayoutTests/fast/files/blob-network-process-crash-expected.txt >=================================================================== >--- LayoutTests/fast/files/blob-network-process-crash-expected.txt (nonexistent) >+++ LayoutTests/fast/files/blob-network-process-crash-expected.txt (working copy) >@@ -0,0 +1,2 @@ >+This tests unregistering a Blob object after the network process to which it was registered crashed. >+WebKit should not hit a debug assertion in the network process. >Index: LayoutTests/fast/files/blob-network-process-crash.html >=================================================================== >--- LayoutTests/fast/files/blob-network-process-crash.html (nonexistent) >+++ LayoutTests/fast/files/blob-network-process-crash.html (working copy) >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests unregistering a Blob object after the network process to which it was registered crashed.<br> >+WebKit should not hit a debug assertion in the network process.</p> >+<script> >+ >+if (!window.testRunner) >+ document.write('This test requires testRunner and GCController'); >+else { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ >+ let blobs = new Array(100); >+ for (let i = 0; i < 100; i++) { >+ blobs[i] = new Array(10); >+ for (let j = 0; j < 10; j++) >+ blobs[i][j] = new Blob(["some text"]); >+ } >+ >+ testRunner.terminateNetworkProcess(); >+ >+ setTimeout(() => { >+ const newBlob = new Blob(["some text"]); >+ for (let i = 0; i < 100; i++) { >+ for (let j = 0; j < 10; j++) >+ blobs[i][j] = { }; >+ } >+ blobs = null; >+ GCController.collect(); >+ fetch('blob-network-process-crash.html').then(() => { >+ testRunner.notifyDone(); >+ }); >+ }, 0); >+} >+ >+</script> >+</body> >+</html> >Index: LayoutTests/platform/wk2/TestExpectations >=================================================================== >--- LayoutTests/platform/wk2/TestExpectations (revision 235213) >+++ LayoutTests/platform/wk2/TestExpectations (working copy) >@@ -740,6 +740,8 @@ http/wpt/cross-origin-resource-policy/ [ > http/tests/navigation/useragent-reload.php [ Pass ] > webkit.org/b/187931 storage/indexeddb/modern/opendatabase-after-storage-crash.html [ Skip ] > >+# testRunner.terminateNetworkProcess() only works in WebKit2 >+fast/files/blob-network-process-crash.html[ Pass ] > > ### END OF (5) Progressions, expected successes that are expected failures in WebKit1. > ########################################
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 188880
:
347902
|
347903
|
347911
| 347913