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

Unified Diff: sky/engine/bindings/builtin_natives.cc

Issue 1243483002: Port more uses of OwnPtr to std::unique_ptr (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/engine/tonic/dart_library_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/builtin_natives.cc
diff --git a/sky/engine/bindings/builtin_natives.cc b/sky/engine/bindings/builtin_natives.cc
index 4fe71c3616d1e0b137b3188adfaedc3a30dd5c98..476a23fc340a39c35ab308a6088cbe94e8a7235f 100644
--- a/sky/engine/bindings/builtin_natives.cc
+++ b/sky/engine/bindings/builtin_natives.cc
@@ -210,12 +210,13 @@ void Timer_create(Dart_NativeArguments args) {
DartState* state = DartState::Current();
CHECK(state);
- OwnPtr<DartTimerHeap::Task> task = adoptPtr(new DartTimerHeap::Task);
+ std::unique_ptr<DartTimerHeap::Task> task =
+ std::unique_ptr<DartTimerHeap::Task>(new DartTimerHeap::Task);
task->closure.Set(state, closure);
task->delay = base::TimeDelta::FromMilliseconds(milliseconds);
task->repeating = repeating;
- int timer_id = state->timer_heap().Add(task.release());
+ int timer_id = state->timer_heap().Add(std::move(task));
Dart_SetIntegerReturnValue(args, timer_id);
}
« no previous file with comments | « no previous file | sky/engine/tonic/dart_library_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698