summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjochen <jochen@chromium.org>2014-09-17 05:57:13 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-17 12:57:23 +0000
commit067d394381c7317538764c1e4cddd56c75a0cd96 (patch)
tree49b0f845c44a89f6302e1a991429f5e78456fd26
parent8b1791fee7b9079df25a4524daf3923ad62b8264 (diff)
downloadchromium_src-067d394381c7317538764c1e4cddd56c75a0cd96.zip
chromium_src-067d394381c7317538764c1e4cddd56c75a0cd96.tar.gz
chromium_src-067d394381c7317538764c1e4cddd56c75a0cd96.tar.bz2
Pass ResourceConstraints to V8 via the Isolate constructor
BUG=none R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/570423002 Cr-Commit-Position: refs/heads/master@{#295265}
-rw-r--r--gin/isolate_holder.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index afcb109..db4473e 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -35,12 +35,10 @@ IsolateHolder::IsolateHolder() {
v8::Isolate::CreateParams params;
params.entry_hook = DebugImpl::GetFunctionEntryHook();
params.code_event_handler = DebugImpl::GetJitCodeEventHandler();
+ params.constraints.ConfigureDefaults(base::SysInfo::AmountOfPhysicalMemory(),
+ base::SysInfo::AmountOfVirtualMemory(),
+ base::SysInfo::NumberOfProcessors());
isolate_ = v8::Isolate::New(params);
- v8::ResourceConstraints constraints;
- constraints.ConfigureDefaults(base::SysInfo::AmountOfPhysicalMemory(),
- base::SysInfo::AmountOfVirtualMemory(),
- base::SysInfo::NumberOfProcessors());
- v8::SetResourceConstraints(isolate_, &constraints);
isolate_data_.reset(new PerIsolateData(isolate_, g_array_buffer_allocator));
}