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

Side by Side Diff: gin/isolate_holder.cc

Issue 2709473002: [gin] Use access_mode in argument (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 16 matching lines...) Expand all
27 v8::ArrayBuffer::Allocator* g_array_buffer_allocator = nullptr; 27 v8::ArrayBuffer::Allocator* g_array_buffer_allocator = nullptr;
28 } // namespace 28 } // namespace
29 29
30 IsolateHolder::IsolateHolder( 30 IsolateHolder::IsolateHolder(
31 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 31 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
32 : IsolateHolder(std::move(task_runner), AccessMode::kSingleThread) {} 32 : IsolateHolder(std::move(task_runner), AccessMode::kSingleThread) {}
33 33
34 IsolateHolder::IsolateHolder( 34 IsolateHolder::IsolateHolder(
35 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 35 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
36 AccessMode access_mode) 36 AccessMode access_mode)
37 : IsolateHolder(std::move(task_runner), 37 : IsolateHolder(std::move(task_runner), access_mode, kAllowAtomicsWait) {}
38 AccessMode::kSingleThread,
39 kAllowAtomicsWait) {}
40 38
41 IsolateHolder::IsolateHolder( 39 IsolateHolder::IsolateHolder(
42 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 40 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
43 AccessMode access_mode, 41 AccessMode access_mode,
44 AllowAtomicsWaitMode atomics_wait_mode) 42 AllowAtomicsWaitMode atomics_wait_mode)
45 : access_mode_(access_mode) { 43 : access_mode_(access_mode) {
46 v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator; 44 v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator;
47 CHECK(allocator) << "You need to invoke gin::IsolateHolder::Initialize first"; 45 CHECK(allocator) << "You need to invoke gin::IsolateHolder::Initialize first";
48 v8::Isolate::CreateParams params; 46 v8::Isolate::CreateParams params;
49 params.entry_hook = DebugImpl::GetFunctionEntryHook(); 47 params.entry_hook = DebugImpl::GetFunctionEntryHook();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 task_observer_.reset(); 108 task_observer_.reset();
111 } 109 }
112 110
113 void IsolateHolder::EnableIdleTasks( 111 void IsolateHolder::EnableIdleTasks(
114 std::unique_ptr<V8IdleTaskRunner> idle_task_runner) { 112 std::unique_ptr<V8IdleTaskRunner> idle_task_runner) {
115 DCHECK(isolate_data_.get()); 113 DCHECK(isolate_data_.get());
116 isolate_data_->EnableIdleTasks(std::move(idle_task_runner)); 114 isolate_data_->EnableIdleTasks(std::move(idle_task_runner));
117 } 115 }
118 116
119 } // namespace gin 117 } // namespace gin
OLDNEW
« 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