[Webkit-unassigned] [Bug 72538] New: WebWorker threads can outlive the QApplication instance
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 16 13:11:40 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=72538
Summary: WebWorker threads can outlive the QApplication
instance
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: WebKit Qt
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: rectalogic at rectalogic.com
Created an attachment (id=115429)
--> (https://bugs.webkit.org/attachment.cgi?id=115429&action=review)
sample code
Currently when a QWebPage that has WebWorkers is destroyed, or when close() is called from the worker JS, the WorkerThread is quit (WebCore::Document::detach calls WebCore::ScriptExecutionContext::stopActiveDOMObjects which calls WebCore::Worker::stop) but not waited for. So there is a race condition, if the QApplication event loop quits and QApplication is destroyed, the WorkerThreads may still be running and may access internal Qt state and crash.
See bug 72155 for some discussion of this.
The attached sample code demonstrates this. It loads a page that spawns WebWorkers, then waits and quits QApplication. Setting a breakpoint in QCoreApplication::~QCoreApplication you can see a number of WorkerThreads are still active and have not finished shutting down.
Somewhere we should wait for the WorkerThreads to finish.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list