|Summary:||[v8] In Workers, script errors right after close() are not delivered to the Worker.onerror|
|Product:||WebKit||Reporter:||Dmitry Titov <dimich>|
|Component:||WebCore Misc.||Assignee:||Dmitry Titov <dimich>|
|Severity:||Normal||CC:||atwilson, levin, yurys|
|Version:||528+ (Nightly build)|
Description Dmitry Titov 2010-04-15 18:54:58 PDT
WorkerGlobalScope.close() sets a flag in WorkerScriptController which makes WorkerScriptController::proxy() to always return 0. That prevents re-entry in JS after the block of script that called close() exits. However, the static accessor WebCore::getScriptExecutionContext() that retrieves the current WorkerContext using the DOM wrapper of the current v8 context uses proxy() and therefore starts to return 0 as well. This is un-necessary (and harmful) since retrieving of the current WorkerContext is not used to evaluate JS but rather to call various methods on it (like reportException(...)) and creating objects, which is fine to do even after close() called. The worker-close.html layout test is currently failing on chromium for this reason. The fix is to avoid using proxy() for pulling out the WorkerContext from WorkerScriptController and just pull it from WorkerScriptController directly, since it also has it. Patch coming.