Skip to content

Commit 62493e9

Browse files
committed
src: add not-weak DCHECK to PersistentToLocal::Strong
Refs: #38821 (comment) PR-URL: #38875 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 21f5a56 commit 62493e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ class PersistentToLocal {
772772
template <class TypeName>
773773
static inline v8::Local<TypeName> Strong(
774774
const v8::PersistentBase<TypeName>& persistent) {
775+
DCHECK(!persistent.IsWeak());
775776
return *reinterpret_cast<v8::Local<TypeName>*>(
776777
const_cast<v8::PersistentBase<TypeName>*>(&persistent));
777778
}

0 commit comments

Comments
 (0)