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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h

Issue 1535943005: Initial implementation of bindings and basic classes for worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: absolute paths for DEPS file. Created 4 years, 11 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
Index: third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h b/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h
index 91c87937b8d7064511408947c9e59886f51dabdb..9d563cee0cfe2613e5e9cec3342d3d8c7138c85d 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h
+++ b/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h
@@ -48,13 +48,13 @@ class CachedMetadataHandler;
class ErrorEvent;
class ExceptionState;
class ScriptSourceCode;
-class WorkerGlobalScope;
+class WorkerOrWorkletGlobalScope;
class CORE_EXPORT WorkerOrWorkletScriptController : public NoBaseWillBeGarbageCollectedFinalized<WorkerOrWorkletScriptController> {
USING_FAST_MALLOC_WILL_BE_REMOVED(WorkerOrWorkletScriptController);
WTF_MAKE_NONCOPYABLE(WorkerOrWorkletScriptController);
public:
- static PassOwnPtrWillBeRawPtr<WorkerOrWorkletScriptController> create(WorkerGlobalScope*, v8::Isolate*);
+ static PassOwnPtrWillBeRawPtr<WorkerOrWorkletScriptController> create(WorkerOrWorkletGlobalScope*, v8::Isolate*);
virtual ~WorkerOrWorkletScriptController();
void dispose();
@@ -94,15 +94,19 @@ public:
bool isContextInitialized() const { return m_scriptState && !!m_scriptState->perContextData(); }
private:
- WorkerOrWorkletScriptController(WorkerGlobalScope*, v8::Isolate*);
+ WorkerOrWorkletScriptController(WorkerOrWorkletGlobalScope*, v8::Isolate*);
class ExecutionState;
- v8::Isolate* isolate() const;
-
// Evaluate a script file in the current execution environment.
ScriptValue evaluate(const String& script, const String& fileName, const TextPosition& scriptStartPosition, CachedMetadataHandler*, V8CacheOptions);
- RawPtrWillBeMember<WorkerGlobalScope> m_workerGlobalScope;
+ RawPtrWillBeMember<WorkerOrWorkletGlobalScope> m_globalScope;
+
+ // The v8 isolate associated to the (worker or worklet) global scope. For
+ // workers this should be the worker thread's isolate, while for worklets
+ // usually the main thread's isolate is used.
+ v8::Isolate* m_isolate;
+
RefPtr<ScriptState> m_scriptState;
RefPtr<DOMWrapperWorld> m_world;
String m_disableEvalPending;

Powered by Google App Engine
This is Rietveld 408576698