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

Unified Diff: gin/v8_initializer.cc

Issue 1491083002: Set V8 extras mode in gin::V8Initializer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/v8_initializer.h ('k') | mojo/edk/js/tests/js_to_cpp_tests.cc » ('j') | 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 8bcc78dfa772568d61de2a46bb56e0eaaee95a9d..5440b961c62814f2c9dc42d23ab48845d69e371c 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -362,17 +362,22 @@ base::PlatformFile V8Initializer::GetOpenSnapshotFileForChildProcesses(
#endif // defined(V8_USE_EXTERNAL_STARTUP_DATA)
// static
-void V8Initializer::Initialize(gin::IsolateHolder::ScriptMode mode) {
+void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
+ IsolateHolder::V8ExtrasMode v8_extras_mode) {
static bool v8_is_initialized = false;
if (v8_is_initialized)
return;
v8::V8::InitializePlatform(V8Platform::Get());
- if (gin::IsolateHolder::kStrictMode == mode) {
+ if (IsolateHolder::kStrictMode == mode) {
static const char use_strict[] = "--use_strict";
v8::V8::SetFlagsFromString(use_strict, sizeof(use_strict) - 1);
}
+ if (IsolateHolder::kStableAndExperimentalV8Extras == v8_extras_mode) {
+ static const char flag[] = "--experimental_extras";
+ v8::V8::SetFlagsFromString(flag, sizeof(flag) - 1);
+ }
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
v8::StartupData natives;
« no previous file with comments | « gin/v8_initializer.h ('k') | mojo/edk/js/tests/js_to_cpp_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698