From e644ab6f0a089d26f33428a872ab3d8a80ec6c65 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 31 May 2021 21:49:32 +0200 Subject: [PATCH] src: add not-weak DCHECK to PersistentToLocal::Strong Refs: https://github.com/nodejs/node/pull/38821#issuecomment-851644135 --- src/util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.h b/src/util.h index 1f7c7580a7e036..056f8da6e2c0ae 100644 --- a/src/util.h +++ b/src/util.h @@ -772,6 +772,7 @@ class PersistentToLocal { template static inline v8::Local Strong( const v8::PersistentBase& persistent) { + DCHECK(!persistent.IsWeak()); return *reinterpret_cast*>( const_cast*>(&persistent)); }