Skip to content

Commit 220baad

Browse files
authored
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 <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent c742220 commit 220baad

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
@@ -839,6 +839,7 @@ void Environment::set_process_exit_handler(
839839
return PropertyName##_.Get(isolate_); \
840840
} \
841841
inline void IsolateData::set_##PropertyName(v8::Local<TypeName> value) { \
842+
CHECK(PropertyName##_.IsEmpty()); \
842843
PropertyName##_.Set(isolate_, value); \
843844
}
844845
PER_ISOLATE_TEMPLATE_PROPERTIES(V)

0 commit comments

Comments
 (0)