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

Side by Side Diff: gin/isolate_holder.cc

Issue 1848423002: Convert //gin to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « gin/converter_unittest.cc ('k') | gin/modules/module_registry.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
11 #include <memory>
10 #include <utility> 12 #include <utility>
11 13
12 #include "base/logging.h" 14 #include "base/logging.h"
13 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
14 #include "base/sys_info.h" 16 #include "base/sys_info.h"
15 #include "gin/debug_impl.h" 17 #include "gin/debug_impl.h"
16 #include "gin/function_template.h" 18 #include "gin/function_template.h"
17 #include "gin/per_isolate_data.h" 19 #include "gin/per_isolate_data.h"
18 #include "gin/run_microtasks_observer.h" 20 #include "gin/run_microtasks_observer.h"
19 #include "gin/v8_initializer.h" 21 #include "gin/v8_initializer.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 base::MessageLoop::current()->AddTaskObserver(task_observer_.get()); 91 base::MessageLoop::current()->AddTaskObserver(task_observer_.get());
90 } 92 }
91 93
92 void IsolateHolder::RemoveRunMicrotasksObserver() { 94 void IsolateHolder::RemoveRunMicrotasksObserver() {
93 DCHECK(task_observer_.get()); 95 DCHECK(task_observer_.get());
94 base::MessageLoop::current()->RemoveTaskObserver(task_observer_.get()); 96 base::MessageLoop::current()->RemoveTaskObserver(task_observer_.get());
95 task_observer_.reset(); 97 task_observer_.reset();
96 } 98 }
97 99
98 void IsolateHolder::EnableIdleTasks( 100 void IsolateHolder::EnableIdleTasks(
99 scoped_ptr<V8IdleTaskRunner> idle_task_runner) { 101 std::unique_ptr<V8IdleTaskRunner> idle_task_runner) {
100 DCHECK(isolate_data_.get()); 102 DCHECK(isolate_data_.get());
101 isolate_data_->EnableIdleTasks(std::move(idle_task_runner)); 103 isolate_data_->EnableIdleTasks(std::move(idle_task_runner));
102 } 104 }
103 105
104 } // namespace gin 106 } // namespace gin
OLDNEW
« no previous file with comments | « gin/converter_unittest.cc ('k') | gin/modules/module_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698