OLD | NEW |
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 #include <utility> |
10 | 11 |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
13 #include "base/sys_info.h" | 14 #include "base/sys_info.h" |
14 #include "gin/debug_impl.h" | 15 #include "gin/debug_impl.h" |
15 #include "gin/function_template.h" | 16 #include "gin/function_template.h" |
16 #include "gin/per_isolate_data.h" | 17 #include "gin/per_isolate_data.h" |
17 #include "gin/run_microtasks_observer.h" | 18 #include "gin/run_microtasks_observer.h" |
18 #include "gin/v8_initializer.h" | 19 #include "gin/v8_initializer.h" |
19 #include "gin/v8_isolate_memory_dump_provider.h" | 20 #include "gin/v8_isolate_memory_dump_provider.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 91 |
91 void IsolateHolder::RemoveRunMicrotasksObserver() { | 92 void IsolateHolder::RemoveRunMicrotasksObserver() { |
92 DCHECK(task_observer_.get()); | 93 DCHECK(task_observer_.get()); |
93 base::MessageLoop::current()->RemoveTaskObserver(task_observer_.get()); | 94 base::MessageLoop::current()->RemoveTaskObserver(task_observer_.get()); |
94 task_observer_.reset(); | 95 task_observer_.reset(); |
95 } | 96 } |
96 | 97 |
97 void IsolateHolder::EnableIdleTasks( | 98 void IsolateHolder::EnableIdleTasks( |
98 scoped_ptr<V8IdleTaskRunner> idle_task_runner) { | 99 scoped_ptr<V8IdleTaskRunner> idle_task_runner) { |
99 DCHECK(isolate_data_.get()); | 100 DCHECK(isolate_data_.get()); |
100 isolate_data_->EnableIdleTasks(idle_task_runner.Pass()); | 101 isolate_data_->EnableIdleTasks(std::move(idle_task_runner)); |
101 } | 102 } |
102 | 103 |
103 } // namespace gin | 104 } // namespace gin |
OLD | NEW |