summaryrefslogtreecommitdiff
path: root/src/env-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/env-inl.h')
-rw-r--r--src/env-inl.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/env-inl.h b/src/env-inl.h
index 9752613b29..824b7529a9 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -625,8 +625,7 @@ void Environment::CreateImmediate(native_immediate_callback cb,
native_immediate_callbacks_.push_back({
cb,
data,
- std::unique_ptr<Persistent<v8::Object>>(obj.IsEmpty() ?
- nullptr : new Persistent<v8::Object>(isolate_, obj)),
+ v8::Global<v8::Object>(isolate_, obj),
ref
});
immediate_info()->count_inc(1);