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

Unified Diff: Source/bindings/core/v8/ScriptController.cpp

Issue 432273004: Implement Blink-side changes to enable V8 code caching. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: V8CacheOptions enum (instead of string) Created 6 years, 4 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: Source/bindings/core/v8/ScriptController.cpp
diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
index e2fb2110effb04272e11cf2740cffc82dd3b7341..5dfb7200fb337c7cfb308646f429a7cb957e9f0e 100644
--- a/Source/bindings/core/v8/ScriptController.cpp
+++ b/Source/bindings/core/v8/ScriptController.cpp
@@ -174,6 +174,10 @@ v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Handle<v8
v8::Local<v8::Value> result;
{
+ V8CacheOptionsType v8CacheOptions(V8CacheOff);
+ if (m_frame->settings())
+ v8CacheOptions = m_frame->settings()->v8CacheOptions();
+
// Isolate exceptions that occur when compiling and executing
// the code. These exceptions should not interfere with
// javascript code we might evaluate from C++ when returning
@@ -181,7 +185,7 @@ v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Handle<v8
v8::TryCatch tryCatch;
tryCatch.SetVerbose(true);
- v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(source, m_isolate, corsStatus);
+ v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(source, m_isolate, corsStatus, v8CacheOptions);
// Keep LocalFrame (and therefore ScriptController) alive.
RefPtr<LocalFrame> protect(m_frame);
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8CacheOptionsType.h » ('j') | Source/bindings/core/v8/V8CacheOptionsType.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698