Chromium Code Reviews| Index: Source/bindings/core/v8/WorkerScriptController.h |
| diff --git a/Source/bindings/core/v8/WorkerScriptController.h b/Source/bindings/core/v8/WorkerScriptController.h |
| index f25230d75d880cfcd37a4e36455748fc780439ba..73c9f55675859f2c95268ddd6e6c9ea7c4e8628d 100644 |
| --- a/Source/bindings/core/v8/WorkerScriptController.h |
| +++ b/Source/bindings/core/v8/WorkerScriptController.h |
| @@ -41,25 +41,11 @@ |
| namespace WebCore { |
| class ErrorEvent; |
| +class ExceptionState; |
| class ScriptSourceCode; |
| class ScriptValue; |
| class WorkerGlobalScope; |
| - |
| -struct WorkerGlobalScopeExecutionState { |
| - WorkerGlobalScopeExecutionState() |
| - : hadException(false) |
| - , lineNumber(0) |
| - , columnNumber(0) |
| - { |
| - } |
| - |
| - bool hadException; |
| - String errorMessage; |
| - int lineNumber; |
| - int columnNumber; |
| - String sourceURL; |
| - ScriptValue exception; |
| -}; |
| +class WorkerGlobalScopeExecutionState; |
| class WorkerScriptController { |
| public: |
| @@ -72,7 +58,7 @@ public: |
| void evaluate(const ScriptSourceCode&, RefPtrWillBeRawPtr<ErrorEvent>* = 0); |
| - void rethrowExceptionFromImportedScript(PassRefPtrWillBeRawPtr<ErrorEvent>); |
| + void rethrowExceptionFromImportedScript(PassRefPtrWillBeRawPtr<ErrorEvent>, ExceptionState&); |
| // Async request to terminate a future JS execution. Eventually causes termination |
| // exception raised during JS execution, if the worker thread happens to run JS. |
| @@ -89,9 +75,6 @@ public: |
| void disableEval(const String&); |
| - // Evaluate a script file in the current execution environment. |
| - ScriptValue evaluate(const String& script, const String& fileName, const TextPosition& scriptStartPosition, WorkerGlobalScopeExecutionState*); |
| - |
| v8::Isolate* isolate() const { return m_isolate; } |
| DOMWrapperWorld& world() const { return *m_world; } |
| ScriptState* scriptState() { return m_scriptState.get(); } |
| @@ -103,8 +86,12 @@ public: |
| // until real work has been done. |
| bool idleNotification() { return v8::V8::IdleNotification(); } |
| - |
| private: |
| + class WorkerGlobalScopeExecutionState; |
| + |
| + // Evaluate a script file in the current execution environment. |
| + ScriptValue evaluate(const String& script, const String& fileName, const TextPosition& scriptStartPosition); |
| + |
| v8::Isolate* m_isolate; |
| WorkerGlobalScope& m_workerGlobalScope; |
| RefPtr<ScriptState> m_scriptState; |
| @@ -113,7 +100,7 @@ private: |
| bool m_executionForbidden; |
| bool m_executionScheduledToTerminate; |
| mutable Mutex m_scheduledTerminationMutex; |
| - RefPtrWillBePersistent<ErrorEvent> m_errorEventFromImportedScript; |
| + WorkerGlobalScopeExecutionState* m_globalScopeExecutionState; |
|
haraken
2014/07/18 01:12:38
Shall we add a comment about why we don't need to
sof
2014/07/18 07:00:46
Good idea; tried to explain.
|
| OwnPtr<V8IsolateInterruptor> m_interruptor; |
| }; |