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

Side by Side Diff: gin/isolate_holder.cc

Issue 2478813002: When an Isolate is configured to use lockers, foreground tasks need to lock (Closed)
Patch Set: updates Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | gin/per_isolate_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gin/public/isolate_holder.h" 5 #include "gin/public/isolate_holder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 23 matching lines...) Expand all
34 : access_mode_(access_mode) { 34 : access_mode_(access_mode) {
35 v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator; 35 v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator;
36 CHECK(allocator) << "You need to invoke gin::IsolateHolder::Initialize first"; 36 CHECK(allocator) << "You need to invoke gin::IsolateHolder::Initialize first";
37 v8::Isolate::CreateParams params; 37 v8::Isolate::CreateParams params;
38 params.entry_hook = DebugImpl::GetFunctionEntryHook(); 38 params.entry_hook = DebugImpl::GetFunctionEntryHook();
39 params.code_event_handler = DebugImpl::GetJitCodeEventHandler(); 39 params.code_event_handler = DebugImpl::GetJitCodeEventHandler();
40 params.constraints.ConfigureDefaults(base::SysInfo::AmountOfPhysicalMemory(), 40 params.constraints.ConfigureDefaults(base::SysInfo::AmountOfPhysicalMemory(),
41 base::SysInfo::AmountOfVirtualMemory()); 41 base::SysInfo::AmountOfVirtualMemory());
42 params.array_buffer_allocator = allocator; 42 params.array_buffer_allocator = allocator;
43 isolate_ = v8::Isolate::New(params); 43 isolate_ = v8::Isolate::New(params);
44 isolate_data_.reset(new PerIsolateData(isolate_, allocator)); 44 isolate_data_.reset(new PerIsolateData(isolate_, allocator, access_mode));
45 isolate_memory_dump_provider_.reset(new V8IsolateMemoryDumpProvider(this)); 45 isolate_memory_dump_provider_.reset(new V8IsolateMemoryDumpProvider(this));
46 #if defined(OS_WIN) 46 #if defined(OS_WIN)
47 { 47 {
48 void* code_range; 48 void* code_range;
49 size_t size; 49 size_t size;
50 isolate_->GetCodeRange(&code_range, &size); 50 isolate_->GetCodeRange(&code_range, &size);
51 Debug::CodeRangeCreatedCallback callback = 51 Debug::CodeRangeCreatedCallback callback =
52 DebugImpl::GetCodeRangeCreatedCallback(); 52 DebugImpl::GetCodeRangeCreatedCallback();
53 if (code_range && size && callback) 53 if (code_range && size && callback)
54 callback(code_range, size); 54 callback(code_range, size);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 task_observer_.reset(); 97 task_observer_.reset();
98 } 98 }
99 99
100 void IsolateHolder::EnableIdleTasks( 100 void IsolateHolder::EnableIdleTasks(
101 std::unique_ptr<V8IdleTaskRunner> idle_task_runner) { 101 std::unique_ptr<V8IdleTaskRunner> idle_task_runner) {
102 DCHECK(isolate_data_.get()); 102 DCHECK(isolate_data_.get());
103 isolate_data_->EnableIdleTasks(std::move(idle_task_runner)); 103 isolate_data_->EnableIdleTasks(std::move(idle_task_runner));
104 } 104 }
105 105
106 } // namespace gin 106 } // namespace gin
OLDNEW
« no previous file with comments | « no previous file | gin/per_isolate_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698