Title: [204085] trunk
- Revision
- 204085
- Author
- [email protected]
- Date
- 2016-08-03 10:15:12 -0700 (Wed, 03 Aug 2016)
Log Message
http/tests/fetch/fetch-in-worker-crash.html is sometimes crashing
https://bugs.webkit.org/show_bug.cgi?id=160498
Patch by Youenn Fablet <[email protected]> on 2016-08-03
Reviewed by Chris Dumez.
Source/WebCore:
Covered by http/tests/fetch/fetch-in-worker-crash.html.
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::cancel): Taking a reference of the client wrapper to ensure it can be cleaned-up successfully.
LayoutTests:
* http/tests/fetch/fetch-in-worker.js:
(onmessage): Reducing flakiness risk by making fetch http load being delayed.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (204084 => 204085)
--- trunk/LayoutTests/ChangeLog 2016-08-03 17:12:55 UTC (rev 204084)
+++ trunk/LayoutTests/ChangeLog 2016-08-03 17:15:12 UTC (rev 204085)
@@ -1,3 +1,13 @@
+2016-08-03 Youenn Fablet <[email protected]>
+
+ http/tests/fetch/fetch-in-worker-crash.html is sometimes crashing
+ https://bugs.webkit.org/show_bug.cgi?id=160498
+
+ Reviewed by Chris Dumez.
+
+ * http/tests/fetch/fetch-in-worker.js:
+ (onmessage): Reducing flakiness risk by making fetch http load being delayed.
+
2016-08-03 Chris Dumez <[email protected]>
Unreviewed, move LayoutTest out of platform/ios-simulator/ios.
Modified: trunk/LayoutTests/http/tests/fetch/fetch-in-worker.js (204084 => 204085)
--- trunk/LayoutTests/http/tests/fetch/fetch-in-worker.js 2016-08-03 17:12:55 UTC (rev 204084)
+++ trunk/LayoutTests/http/tests/fetch/fetch-in-worker.js 2016-08-03 17:15:12 UTC (rev 204085)
@@ -3,7 +3,7 @@
if (e.data !== "start")
return;
- var promise1 = fetch("detached-frame.html").then(() => {
+ var promise1 = fetch("/misc/resources/delayed-log.php?delay=100").then(() => {
postMessage("FAIL: promise 1 resolved");
}, () => {
postMessage("FAIL: promise 1 rejected");
Modified: trunk/Source/WebCore/ChangeLog (204084 => 204085)
--- trunk/Source/WebCore/ChangeLog 2016-08-03 17:12:55 UTC (rev 204084)
+++ trunk/Source/WebCore/ChangeLog 2016-08-03 17:15:12 UTC (rev 204085)
@@ -1,3 +1,15 @@
+2016-08-03 Youenn Fablet <[email protected]>
+
+ http/tests/fetch/fetch-in-worker-crash.html is sometimes crashing
+ https://bugs.webkit.org/show_bug.cgi?id=160498
+
+ Reviewed by Chris Dumez.
+
+ Covered by http/tests/fetch/fetch-in-worker-crash.html.
+
+ * loader/WorkerThreadableLoader.cpp:
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel): Taking a reference of the client wrapper to ensure it can be cleaned-up successfully.
+
2016-08-02 Anders Carlsson <[email protected]>
Freeze the last of the Objective-C bindings
Modified: trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp (204084 => 204085)
--- trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp 2016-08-03 17:12:55 UTC (rev 204084)
+++ trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp 2016-08-03 17:15:12 UTC (rev 204085)
@@ -149,14 +149,17 @@
m_mainThreadLoader = nullptr;
});
- ThreadableLoaderClientWrapper* clientWrapper = m_workerClientWrapper.get();
- if (!clientWrapper->done()) {
- // If the client hasn't reached a termination state, then transition it by sending a cancellation error.
- // Note: no more client callbacks will be done after this method -- the clearClientWrapper() call ensures that.
- ResourceError error(ResourceError::Type::Cancellation);
- clientWrapper->didFail(error);
+ if (m_workerClientWrapper->done()) {
+ clearClientWrapper();
+ return;
}
- clearClientWrapper();
+ // Taking a ref of client wrapper as call to didFail may take out the last reference of it.
+ Ref<ThreadableLoaderClientWrapper> protectedWorkerClientWrapper(*m_workerClientWrapper);
+ // If the client hasn't reached a termination state, then transition it by sending a cancellation error.
+ // Note: no more client callbacks will be done after this method -- we clear the client wrapper to ensure that.
+ ResourceError error(ResourceError::Type::Cancellation);
+ protectedWorkerClientWrapper->didFail(error);
+ protectedWorkerClientWrapper->clearClient();
}
void WorkerThreadableLoader::MainThreadBridge::clearClientWrapper()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes