Index: gin/modules/timer.cc |
diff --git a/gin/modules/timer.cc b/gin/modules/timer.cc |
index 9e5a26c8ea9ea88d7033bf38c88007951d43c3aa..e1deeaad8f5698c5f1861d810d2030ae6f11b9c6 100644 |
--- a/gin/modules/timer.cc |
+++ b/gin/modules/timer.cc |
@@ -67,9 +67,14 @@ void Timer::OnTimerFired() { |
Runner::Scope scope(runner_.get()); |
v8::Isolate* isolate = runner_->GetContextHolder()->isolate(); |
+ |
+ v8::Local<v8::Object> wrapper; |
+ if (!GetWrapper(isolate).ToLocal(&wrapper)) { |
+ return; |
+ } |
+ |
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast( |
- GetWrapper(isolate) |
- .ToLocalChecked() |
+ wrapper |
->GetPrivate(runner_->GetContextHolder()->context(), |
GetHiddenPropertyName(isolate)) |
.ToLocalChecked()); |