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

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: Fix very silly bug that causes an unitialized field and a CHECK fail at startup. 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8CacheOptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..97a7ff9eeaf06d2fd0dada1a3cbf73a63e183300 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;
{
+ V8CacheOptions v8CacheOptions(V8CacheOptionsOff);
+ 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/V8CacheOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698