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

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

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 7f0ad02a9151e28b49a3e60f707a51c6ecdc4d07..8996dd73b59af06b74a45318b30ad2ee26dbc6f1 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h
+++ b/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h
@@ -40,6 +40,7 @@
#include "wtf/Allocator.h"
#include "wtf/OwnPtr.h"
#include "wtf/ThreadingPrimitives.h"
+#include "wtf/Vector.h"
#include "wtf/text/TextPosition.h"
#include <v8.h>
@@ -51,10 +52,13 @@ class ExceptionState;
class ScriptSourceCode;
class WorkerOrWorkletGlobalScope;
+typedef WTF::Vector<v8::Extension*> V8Extensions;
+
class CORE_EXPORT WorkerOrWorkletScriptController : public GarbageCollectedFinalized<WorkerOrWorkletScriptController> {
WTF_MAKE_NONCOPYABLE(WorkerOrWorkletScriptController);
public:
static RawPtr<WorkerOrWorkletScriptController> create(WorkerOrWorkletGlobalScope*, v8::Isolate*);
+ static void registerExtensionIfNeeded(v8::Extension*);
virtual ~WorkerOrWorkletScriptController();
void dispose();
@@ -96,6 +100,7 @@ public:
private:
WorkerOrWorkletScriptController(WorkerOrWorkletGlobalScope*, v8::Isolate*);
class ExecutionState;
+ static V8Extensions& registeredExtensions();
// Evaluate a script file in the current execution environment.
ScriptValue evaluate(const CompressibleString& script, const String& fileName, const TextPosition& scriptStartPosition, CachedMetadataHandler*, V8CacheOptions);

Powered by Google App Engine
This is Rietveld 408576698