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

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

Issue 929953002: CachedMetadata support for ServiceWorker script. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated tkent's comment Created 5 years, 10 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 | « Source/bindings/core/v8/ScriptStreamerTest.cpp ('k') | Source/bindings/core/v8/V8ScriptRunner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8ScriptRunner.h
diff --git a/Source/bindings/core/v8/V8ScriptRunner.h b/Source/bindings/core/v8/V8ScriptRunner.h
index 7c61d0a4e2d2bfcf11764cfcdf25df5bbd4bee82..07e4eb8ed0bd19fa15c89351bffae910d4628893 100644
--- a/Source/bindings/core/v8/V8ScriptRunner.h
+++ b/Source/bindings/core/v8/V8ScriptRunner.h
@@ -35,6 +35,7 @@
namespace blink {
+class CachedMetadataHandler;
class Resource;
class ScriptResource;
class ScriptSourceCode;
@@ -46,7 +47,11 @@ public:
// For the following methods, the caller sites have to hold
// a HandleScope and a ContextScope.
static v8::Local<v8::Script> compileScript(const ScriptSourceCode&, v8::Isolate*, AccessControlStatus = SharableCrossOrigin, V8CacheOptions = V8CacheOptionsDefault);
- static v8::Local<v8::Script> compileScript(v8::Handle<v8::String>, const String& fileName, const TextPosition&, ScriptResource*, ScriptStreamer*, v8::Isolate*, AccessControlStatus = SharableCrossOrigin, V8CacheOptions = V8CacheOptionsDefault, bool isInternalScript = false);
+ // CachedMetadataHandler is set when metadata caching is supported. For
+ // normal scripe resources, CachedMetadataHandler is from ScriptResource.
+ // For worker script, ScriptResource is null but CachedMetadataHandler may be
+ // set. When ScriptStreamer is set, ScriptResource must be set.
+ static v8::Local<v8::Script> compileScript(v8::Handle<v8::String>, const String& fileName, const TextPosition&, v8::Isolate*, ScriptResource* = nullptr, ScriptStreamer* = nullptr, CachedMetadataHandler* = nullptr, AccessControlStatus = SharableCrossOrigin, V8CacheOptions = V8CacheOptionsDefault, bool isInternalScript = false);
static v8::Local<v8::Value> runCompiledScript(v8::Isolate*, v8::Handle<v8::Script>, ExecutionContext*);
static v8::Local<v8::Value> compileAndRunInternalScript(v8::Handle<v8::String>, v8::Isolate*, const String& = String(), const TextPosition& = TextPosition());
static v8::Local<v8::Value> runCompiledInternalScript(v8::Isolate*, v8::Handle<v8::Script>);
@@ -56,8 +61,8 @@ public:
static v8::Local<v8::Object> instantiateObject(v8::Isolate*, v8::Handle<v8::Function>, int argc = 0, v8::Handle<v8::Value> argv[] = 0);
static v8::Local<v8::Object> instantiateObjectInDocument(v8::Isolate*, v8::Handle<v8::Function>, ExecutionContext*, int argc = 0, v8::Handle<v8::Value> argv[] = 0);
- static unsigned tagForParserCache(Resource*);
- static unsigned tagForCodeCache(Resource*);
+ static unsigned tagForParserCache(CachedMetadataHandler*);
+ static unsigned tagForCodeCache(CachedMetadataHandler*);
};
} // namespace blink
« no previous file with comments | « Source/bindings/core/v8/ScriptStreamerTest.cpp ('k') | Source/bindings/core/v8/V8ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698