Index: Source/bindings/core/v8/V8ScriptRunner.h |
diff --git a/Source/bindings/core/v8/V8ScriptRunner.h b/Source/bindings/core/v8/V8ScriptRunner.h |
index bf8ceb94b110e7c67d32847292e62d9ba47e2ed0..92b0f2cdd682ad732152e17a49ea19613063ec38 100644 |
--- a/Source/bindings/core/v8/V8ScriptRunner.h |
+++ b/Source/bindings/core/v8/V8ScriptRunner.h |
@@ -38,13 +38,14 @@ namespace blink { |
class ScriptResource; |
class ScriptSourceCode; |
class ExecutionContext; |
+class V8ScriptStreamer; |
class V8ScriptRunner { |
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 = V8CacheOptionsOff); |
- static v8::Local<v8::Script> compileScript(v8::Handle<v8::String>, const String& fileName, const TextPosition&, ScriptResource*, v8::Isolate*, AccessControlStatus = SharableCrossOrigin, V8CacheOptions = V8CacheOptionsOff); |
+ static v8::Local<v8::Script> compileScript(v8::Handle<v8::String>, const String& fileName, const TextPosition&, ScriptResource*, V8ScriptStreamer*, v8::Isolate*, AccessControlStatus = SharableCrossOrigin, V8CacheOptions = V8CacheOptionsOff); |
static v8::Local<v8::Value> runCompiledScript(v8::Handle<v8::Script>, ExecutionContext*, v8::Isolate*); |
static v8::Local<v8::Value> compileAndRunInternalScript(v8::Handle<v8::String>, v8::Isolate*, const String& = String(), const TextPosition& = TextPosition()); |
static v8::Local<v8::Value> callInternalFunction(v8::Handle<v8::Function>, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> info[], v8::Isolate*); |
@@ -54,6 +55,15 @@ 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); |
+ // Make a decision on whether we want to use V8 caching and how. dataType, |
+ // produceOption, consumeOption are out parameters. |
+ static bool CacheDecider( |
+ unsigned codeLength, |
+ const ScriptResource*, |
+ V8CacheOptions, |
+ unsigned* dataType, |
+ v8::ScriptCompiler::CompileOptions*, |
+ bool* produce); |
}; |
} // namespace blink |