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

Unified Diff: gin/modules/timer.cc

Issue 580703002: Code re-factor related to WeakPtrFactory in src/gin module (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« gin/modules/timer.h ('K') | « gin/modules/timer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/modules/timer.cc
diff --git a/gin/modules/timer.cc b/gin/modules/timer.cc
index 3196dda42587945f16b5893dadeba4d979f7838e..4ba7f9174e4563c5931b44ba3993a31ac8764b50 100644
--- a/gin/modules/timer.cc
+++ b/gin/modules/timer.cc
@@ -41,10 +41,10 @@ ObjectTemplateBuilder Timer::GetObjectTemplateBuilder(v8::Isolate* isolate) {
Timer::Timer(v8::Isolate* isolate, bool repeating, int delay_ms,
v8::Handle<v8::Function> function)
- : weak_factory_(this),
- timer_(false, repeating),
+ : timer_(false, repeating),
runner_(PerContextData::From(
- isolate->GetCurrentContext())->runner()->GetWeakPtr()) {
+ isolate->GetCurrentContext())->runner()->GetWeakPtr()),
+ weak_factory_(this) {
GetWrapper(runner_->GetContextHolder()->isolate())->SetHiddenValue(
GetHiddenPropertyName(isolate), function);
timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(delay_ms),
« gin/modules/timer.h ('K') | « gin/modules/timer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698