[Webkit-unassigned] [Bug 36565] [v8] Error in getScriptExecutionContext() when worker context is terminating

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 24 17:38:24 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36565


Andrew Wilson <atwilson at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|webkit-unassigned at lists.web |atwilson at chromium.org
                   |kit.org                     |
                 CC|                            |dimich at chromium.org




--- Comment #2 from Andrew Wilson <atwilson at chromium.org>  2010-03-24 17:38:24 PST ---
Upstream version of http://code.google.com/p/chromium/issues/detail?id=38970

While running the SharedWorkerHttpAuth test under valgrind, I got the following
failed assertion:

Command: 
/Volumes/source/chrome.git/src/xcodebuild/Debug/Chromium.app/Contents/Versions/5.0.360
.0/Chromium\ Helper.app/Contents/MacOS/Chromium\ Helper --type=worker --
channel=58049.0x2040a4d0.1081383255 --enable-logging
Invalid write of size 4
  WebCore::V8Proxy::retrieveWindow(v8::Handle<v8::Context>) 
(/Volumes/source/chrome.git/src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/V8
Proxy.cpp:537)
  WebCore::V8Proxy::retrieveFrame(v8::Handle<v8::Context>) 
(/Volumes/source/chrome.git/src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/V8
Proxy.cpp:543)
  WebCore::V8Proxy::retrieveFrameForCurrentContext() 
(/Volumes/source/chrome.git/src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/V8
Proxy.cpp:566)
  WebCore::getScriptExecutionContext(WebCore::ScriptState*) 
(/Volumes/source/chrome.git/src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/V8
Utilities.cpp:141)
  WebCore::reportException(WebCore::ScriptState*, v8::TryCatch&) 
(/Volumes/source/chrome.git/src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/V8
Utilities.cpp:171)
 
WebCore::V8AbstractEventListener::invokeEventHandler(WebCore::ScriptExecutionContext*, 
WebCore::Event*, v8::Handle<v8::Value>) 
(/Volumes/source/chrome.git/src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/V8
AbstractEventListener.cpp:150)
...

Basically, the problem seems to be that if you're running in a worker thread,
but 
WorkerContextExecutionProxy::retrieve() returns null, then
getScriptExecutionContext() assumes 
that we're running in document context and a failed assertion ensues.

We need to change the API to allow callers to differentiate between "I'm in a
worker context but it's shutting down" from "I'm in a document context".

-- 
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