diff options
Diffstat (limited to 'WebCore/bindings/v8/WorkerScriptController.h')
-rw-r--r-- | WebCore/bindings/v8/WorkerScriptController.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/WebCore/bindings/v8/WorkerScriptController.h b/WebCore/bindings/v8/WorkerScriptController.h index 07e224c..616697a 100644 --- a/WebCore/bindings/v8/WorkerScriptController.h +++ b/WebCore/bindings/v8/WorkerScriptController.h @@ -48,14 +48,19 @@ namespace WebCore { WorkerScriptController(WorkerContext*); ~WorkerScriptController(); - WorkerContextExecutionProxy* proxy() { return m_proxy.get(); } + WorkerContextExecutionProxy* proxy() { return m_executionForbidden ? 0 : m_proxy.get(); } + WorkerContext* workerContext() { return m_workerContext; } ScriptValue evaluate(const ScriptSourceCode&); ScriptValue evaluate(const ScriptSourceCode&, ScriptValue* exception); void setException(ScriptValue); - void forbidExecution(); + enum ForbidExecutionOption { TerminateRunningScript, LetRunningScriptFinish }; + void forbidExecution(ForbidExecutionOption); + + // Returns WorkerScriptController for the currently executing context. 0 will be returned if the current executing context is not the worker context. + static WorkerScriptController* controllerForContext(); private: WorkerContext* m_workerContext; |