From fafa1551df6327d7ee52863efe4757faf0c1d50a Mon Sep 17 00:00:00 2001 From: Mark Marron Date: Thu, 23 Mar 2017 14:46:57 -0700 Subject: [PATCH] Fix for build break in PR #194. --- deps/chakrashim/include/v8.h | 5 +++++ src/env-inl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/deps/chakrashim/include/v8.h b/deps/chakrashim/include/v8.h index cb47aa9d407..4b67ce872d6 100644 --- a/deps/chakrashim/include/v8.h +++ b/deps/chakrashim/include/v8.h @@ -684,6 +684,11 @@ class Global : public PersistentBase { other._weakWrapper = nullptr; } + template + static Global New(Isolate* isolate, Local that) { + return Global(isolate, that); + } + V8_INLINE ~Global() { this->Reset(); } template diff --git a/src/env-inl.h b/src/env-inl.h index b7c6fb4f4b4..dded0cf4350 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -389,7 +389,7 @@ inline v8::Local Environment::fs_stats_field_array() const { inline void Environment::set_fs_stats_field_array(v8::Local fields) { CHECK_EQ(fs_stats_field_array_.IsEmpty(), true); // Should be set only once. - fs_stats_field_array_ = v8::Global::Global(isolate_, fields); + fs_stats_field_array_ = v8::Global::New(isolate_, fields); } inline Environment* Environment::from_cares_timer_handle(uv_timer_t* handle) {