| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gin/v8_initializer.h" | 5 #include "gin/v8_initializer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 if (IsolateHolder::kStrictMode == mode) { | 412 if (IsolateHolder::kStrictMode == mode) { |
| 413 static const char use_strict[] = "--use_strict"; | 413 static const char use_strict[] = "--use_strict"; |
| 414 v8::V8::SetFlagsFromString(use_strict, sizeof(use_strict) - 1); | 414 v8::V8::SetFlagsFromString(use_strict, sizeof(use_strict) - 1); |
| 415 } | 415 } |
| 416 if (IsolateHolder::kStableAndExperimentalV8Extras == v8_extras_mode) { | 416 if (IsolateHolder::kStableAndExperimentalV8Extras == v8_extras_mode) { |
| 417 static const char flag[] = "--experimental_extras"; | 417 static const char flag[] = "--experimental_extras"; |
| 418 v8::V8::SetFlagsFromString(flag, sizeof(flag) - 1); | 418 v8::V8::SetFlagsFromString(flag, sizeof(flag) - 1); |
| 419 } | 419 } |
| 420 | 420 |
| 421 const char* ignition_enabled_crash_key = "N"; | 421 const char* ignition_enabled_crash_key = "N"; |
| 422 if (base::FeatureList::IsEnabled(features::kV8Ignition)) { | 422 if (base::FeatureList::IsEnabled(features::kV8Future)) { |
| 423 ignition_enabled_crash_key = "Y"; | 423 ignition_enabled_crash_key = "Y"; |
| 424 std::string flag("--ignition-staging"); | 424 std::string flag("--future"); |
| 425 v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size())); | 425 v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size())); |
| 426 } else if (base::FeatureList::IsEnabled(features::kV8IgnitionLowEnd) && | 426 } else if (base::FeatureList::IsEnabled(features::kV8IgnitionLowEnd) && |
| 427 base::SysInfo::IsLowEndDevice()) { | 427 base::SysInfo::IsLowEndDevice()) { |
| 428 ignition_enabled_crash_key = "Y"; | 428 ignition_enabled_crash_key = "Y"; |
| 429 std::string flag("--ignition"); | 429 std::string flag("--ignition"); |
| 430 v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size())); | 430 v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size())); |
| 431 } | 431 } |
| 432 static const char kIgnitionEnabledKey[] = "v8-ignition"; | 432 static const char kIgnitionEnabledKey[] = "v8-ignition"; |
| 433 base::debug::SetCrashKeyValue(kIgnitionEnabledKey, | 433 base::debug::SetCrashKeyValue(kIgnitionEnabledKey, |
| 434 ignition_enabled_crash_key); | 434 ignition_enabled_crash_key); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 *snapshot_data_out = | 470 *snapshot_data_out = |
| 471 reinterpret_cast<const char*>(g_mapped_snapshot->data()); | 471 reinterpret_cast<const char*>(g_mapped_snapshot->data()); |
| 472 *snapshot_size_out = static_cast<int>(g_mapped_snapshot->length()); | 472 *snapshot_size_out = static_cast<int>(g_mapped_snapshot->length()); |
| 473 } else { | 473 } else { |
| 474 *snapshot_data_out = NULL; | 474 *snapshot_data_out = NULL; |
| 475 *snapshot_size_out = 0; | 475 *snapshot_size_out = 0; |
| 476 } | 476 } |
| 477 } | 477 } |
| 478 | 478 |
| 479 } // namespace gin | 479 } // namespace gin |
| OLD | NEW |