Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: Source/bindings/core/v8/WorkerScriptController.h

Issue 553553002: Remove unused members from WorkerScriptController. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/WorkerScriptController.h
diff --git a/Source/bindings/core/v8/WorkerScriptController.h b/Source/bindings/core/v8/WorkerScriptController.h
index 6ae5d2846edfa200e5e0db6eae25bc28620ab372..a947ec0e68004c81cb7249178e2039ce32aad344 100644
--- a/Source/bindings/core/v8/WorkerScriptController.h
+++ b/Source/bindings/core/v8/WorkerScriptController.h
@@ -43,52 +43,50 @@ namespace blink {
class ErrorEvent;
class ExceptionState;
class ScriptSourceCode;
-class ScriptValue;
class WorkerGlobalScope;
-class WorkerGlobalScopeExecutionState;
class WorkerScriptController {
public:
explicit WorkerScriptController(WorkerGlobalScope&);
~WorkerScriptController();
- WorkerGlobalScope& workerGlobalScope() { return m_workerGlobalScope; }
-
- bool initializeContextIfNeeded();
-
+ bool isExecutionForbidden() const;
+ bool isExecutionTerminating() const;
void evaluate(const ScriptSourceCode&, RefPtrWillBeRawPtr<ErrorEvent>* = 0);
- void rethrowExceptionFromImportedScript(PassRefPtrWillBeRawPtr<ErrorEvent>, ExceptionState&);
+ // Prevents future JavaScript execution. See
+ // scheduleExecutionTermination, isExecutionForbidden.
+ void forbidExecution();
- // Async request to terminate a future JS execution. Eventually causes termination
- // exception raised during JS execution, if the worker thread happens to run JS.
- // After JS execution was terminated in this way, the Worker thread has to use
- // forbidExecution()/isExecutionForbidden() to guard against reentry into JS.
- // Can be called from any thread.
+ // Used by WorkerThread:
+ bool initializeContextIfNeeded();
+ // Async request to terminate future JavaScript execution on the
+ // worker thread. JavaScript evaluation exits with a
+ // non-continuable exception and WorkerScriptController calls
+ // forbidExecution to prevent further JavaScript execution. Use
+ // forbidExecution()/isExecutionForbidden() to guard against
+ // reentry into JavaScript.
void scheduleExecutionTermination();
- bool isExecutionTerminating() const;
-
- // Called on Worker thread when JS exits with termination exception caused by forbidExecution() request,
- // or by Worker thread termination code to prevent future entry into JS.
- void forbidExecution();
- bool isExecutionForbidden() const;
+ // Used by WorkerGlobalScope:
+ void rethrowExceptionFromImportedScript(PassRefPtrWillBeRawPtr<ErrorEvent>, ExceptionState&);
void disableEval(const String&);
-
- v8::Isolate* isolate() const { return m_isolate; }
- DOMWrapperWorld& world() const { return *m_world; }
- ScriptState* scriptState() { return m_scriptState.get(); }
- v8::Local<v8::Context> context() { return m_scriptState ? m_scriptState->context() : v8::Local<v8::Context>(); }
- bool isContextInitialized() { return m_scriptState && !!m_scriptState->perContextData(); }
-
// Send a notification about current thread is going to be idle.
// Returns true if the embedder should stop calling idleNotification
// until real work has been done.
bool idleNotification() { return m_isolate->IdleNotification(1000); }
+ // Used by Inspector agents:
+ ScriptState* scriptState() { return m_scriptState.get(); }
+
+ // Used by V8 bindings:
+ v8::Local<v8::Context> context() { return m_scriptState ? m_scriptState->context() : v8::Local<v8::Context>(); }
+
private:
class WorkerGlobalScopeExecutionState;
+ bool isContextInitialized() { return m_scriptState && !!m_scriptState->perContextData(); }
+
// Evaluate a script file in the current execution environment.
ScriptValue evaluate(const String& script, const String& fileName, const TextPosition& scriptStartPosition);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698