Skip to content

Commit

Permalink
[gin] Update Ignition experiment to pass --ignition-staging.
Browse files Browse the repository at this point in the history
Updates the Ignition experiment to pass --ignition-staging (the intended
shipping configuration). Also remove lazy and eager variants since we aren't
interested in these any longer.

BUG=v8:5280,v8:4868

Review-Url: https://codereview.chromium.org/2264093002
Cr-Commit-Position: refs/heads/master@{#414053}
  • Loading branch information
rmcilroy authored and Commit bot committed Aug 24, 2016
1 parent 0876d0e commit 2c39aa4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 39 deletions.
12 changes: 0 additions & 12 deletions gin/gin_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,4 @@ const base::Feature kV8IgnitionLowEnd {
"V8IgnitionLowEnd", base::FEATURE_ENABLED_BY_DEFAULT
};

// Enables lazy compilation for the V8 Ignition interpreter. Only
// one of V8IgnitionLazy or V8IgnitionEager should be enabled.
const base::Feature kV8IgnitionLazy {
"V8IgnitionLazy", base::FEATURE_DISABLED_BY_DEFAULT
};

// Enables eager compilation for the V8 Ignition interpreter. Only
// one of V8IgnitionLazy or V8IgnitionEager should be enabled.
const base::Feature kV8IgnitionEager {
"V8IgnitionEager", base::FEATURE_DISABLED_BY_DEFAULT
};

} // namespace features
2 changes: 0 additions & 2 deletions gin/public/gin_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ namespace features {

GIN_EXPORT extern const base::Feature kV8Ignition;
GIN_EXPORT extern const base::Feature kV8IgnitionLowEnd;
GIN_EXPORT extern const base::Feature kV8IgnitionLazy;
GIN_EXPORT extern const base::Feature kV8IgnitionEager;

} // namespace features

Expand Down
31 changes: 6 additions & 25 deletions gin/v8_initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,6 @@ bool GenerateEntropy(unsigned char* buffer, size_t amount) {
return true;
}

bool ShouldUseIgnition() {
if (base::FeatureList::IsEnabled(features::kV8Ignition)) return true;
#if defined(OS_ANDROID)
if (base::FeatureList::IsEnabled(features::kV8IgnitionLowEnd) &&
base::SysInfo::IsLowEndDevice()) {
return true;
}
#endif
return false;
}


} // namespace

#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
Expand Down Expand Up @@ -431,22 +419,15 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
}

const char* ignition_enabled_crash_key = "N";
if (ShouldUseIgnition()) {
if (base::FeatureList::IsEnabled(features::kV8Ignition)) {
ignition_enabled_crash_key = "Y";
std::string flag("--ignition-staging");
v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size()));
} else if (base::FeatureList::IsEnabled(features::kV8IgnitionLowEnd) &&
base::SysInfo::IsLowEndDevice()) {
ignition_enabled_crash_key = "Y";
std::string flag("--ignition");
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()));
}
}
static const char kIgnitionEnabledKey[] = "v8-ignition";
base::debug::SetCrashKeyValue(kIgnitionEnabledKey,
Expand Down

0 comments on commit 2c39aa4

Please sign in to comment.