From 067d394381c7317538764c1e4cddd56c75a0cd96 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 17 Sep 2014 05:57:13 -0700 Subject: 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} --- gin/isolate_holder.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gin') 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)); } -- cgit v1.1