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

Unified Diff: Source/bindings/v8/V8Initializer.cpp

Issue 24550008: Configure V8 ResourceConstraints based on a device capabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 2 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: Source/bindings/v8/V8Initializer.cpp
diff --git a/Source/bindings/v8/V8Initializer.cpp b/Source/bindings/v8/V8Initializer.cpp
index 748167825f4958fe48ba152ace3eea0437384328..1dc4cd8bb7cf3014865a67d57a3479fd1b22f2e0 100644
--- a/Source/bindings/v8/V8Initializer.cpp
+++ b/Source/bindings/v8/V8Initializer.cpp
@@ -51,6 +51,7 @@
#include "wtf/RefPtr.h"
#include "wtf/text/WTFString.h"
#include <v8-debug.h>
+#include <v8-defaults.h>
namespace WebCore {
@@ -173,6 +174,7 @@ void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate)
v8::V8::AddMessageListener(messageHandlerInMainThread);
v8::V8::SetFailedAccessCheckCallbackFunction(failedAccessCheckCallbackInMainThread);
v8::V8::SetAllowCodeGenerationFromStringsCallback(codeGenerationCheckCallbackInMainThread);
+ v8::SetDefaultResourceConstraintsForCurrentPlatform();
ScriptProfiler::initialize();
V8PerIsolateData::ensureInitialized(isolate);
}
@@ -216,6 +218,7 @@ void V8Initializer::initializeWorker(v8::Isolate* isolate)
v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
v8::ResourceConstraints resourceConstraints;
+ v8::ConfigureResourceConstraintsForCurrentPlatform(&resourceConstraints);
uint32_t here;
resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uint32_t*));
v8::SetResourceConstraints(&resourceConstraints);
« 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