Skip to content

Commit bb6fd7c

Browse files
addaleaxaduh95
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 <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent 12e5535 commit bb6fd7c

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
@@ -873,6 +873,7 @@ void Environment::set_process_exit_handler(
873873
return PropertyName##_.Get(isolate_); \
874874
} \
875875
inline void IsolateData::set_##PropertyName(v8::Local<TypeName> value) { \
876+
CHECK(PropertyName##_.IsEmpty()); \
876877
PropertyName##_.Set(isolate_, value); \
877878
}
878879
PER_ISOLATE_TEMPLATE_PROPERTIES(V)

0 commit comments

Comments
 (0)