Skip to content

Commit 8a5325d

Browse files
addaleaxtargos
authored andcommitted
src: ensure v8::Eternal is empty before setting it
V8 does not check this for us, but this is a requirement of the API. PR-URL: #59825 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
1 parent ff13d1d commit 8a5325d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/env-inl.h

Lines changed: 1 addition & 0 deletions
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)

0 commit comments

Comments
 (0)