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

Unified Diff: gin/v8_initializer.cc

Issue 1989883002: [Gin] Add V8IgnitionEager feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « gin/public/gin_features.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/v8_initializer.cc
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index c4d734dfc6a1ba09e2124be922934661be48a915..ad29d10effa846bd78a0c82ec04b37c7922f0ed9 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -440,13 +440,21 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
if (base::FeatureList::IsEnabled(features::kV8Ignition)) {
std::string flag("--ignition");
v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size()));
- }
- if (base::FeatureList::IsEnabled(features::kV8IgnitionLazy)) {
- std::string flag("--no-ignition-eager");
- v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size()));
+ if (base::FeatureList::IsEnabled(features::kV8IgnitionEager)) {
+ std::string eager_flag("--ignition-eager");
+ v8::V8::SetFlagsFromString(
+ eager_flag.c_str(), static_cast<int>(eager_flag.size()));
+ }
+
+ if (base::FeatureList::IsEnabled(features::kV8IgnitionLazy)) {
+ std::string lazy_flag("--no-ignition-eager");
+ v8::V8::SetFlagsFromString(
+ lazy_flag.c_str(), static_cast<int>(lazy_flag.size()));
+ }
}
+
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
v8::StartupData natives;
natives.data = reinterpret_cast<const char*>(g_mapped_natives->data());
« no previous file with comments | « gin/public/gin_features.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698