src: ensure `v8::Eternal` is empty before setting it · nodejs/node@8a5325d

Original file line numberDiff line numberDiff line change

@@ -847,6 +847,7 @@ void Environment::set_process_exit_handler(

847847

return PropertyName##_.Get(isolate_); \

848848

} \

849849

inline void IsolateData::set_##PropertyName(v8::Local<TypeName> value) { \

850+

CHECK(PropertyName##_.IsEmpty()); \

850851

PropertyName##_.Set(isolate_, value); \

851852

}

852853

PER_ISOLATE_TEMPLATE_PROPERTIES(V)