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

Unified Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 1835553002: Control ES2015 'Tail call elimination' language feature via finch flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check feature in ChromeRenderProcessObserver Created 4 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_process_observer.cc
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc
index fab4631e6e26d01aae8704a04b753b97dac49137..ff1264890c201d426af40403454f3241e8632ba2 100644
--- a/chrome/renderer/chrome_render_process_observer.cc
+++ b/chrome/renderer/chrome_render_process_observer.cc
@@ -13,6 +13,7 @@
#include "base/base_switches.h"
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/macros.h"
@@ -233,6 +234,10 @@ void CreateResourceUsageReporter(
new ResourceUsageReporterImpl(observer, std::move(request));
}
+const base::Feature kV8_ES2015_TailCalls_Feature {
+ "V8_ES2015_TailCalls", base::FEATURE_DISABLED_BY_DEFAULT
+};
+
} // namespace
bool ChromeRenderProcessObserver::is_incognito_process_ = false;
@@ -246,6 +251,11 @@ ChromeRenderProcessObserver::ChromeRenderProcessObserver()
WebRuntimeFeatures::enableRequestAutocomplete(true);
#endif
+ if (base::FeatureList::IsEnabled(kV8_ES2015_TailCalls_Feature)) {
+ std::string flag("--harmony-tailcalls");
+ v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size()));
+ }
+
if (command_line.HasSwitch(switches::kDisableJavaScriptHarmonyShipping)) {
std::string flag("--noharmony-shipping");
v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698