Update deepequals_fix.patch

This commit is contained in:
Jarred Sumner
2025-06-09 22:46:03 -07:00
committed by GitHub
parent e32fef812f
commit 7dfbfd87f5

View File

@@ -1,14 +0,0 @@
--- a/src/bun.js/bindings/bindings.cpp
+++ b/src/bun.js/bindings/bindings.cpp
@@ -270,6 +270,11 @@ bool readFlagsAndProcessPromise(JSValue& instanceValue, ExpectFlags& flags, JSG
AsymmetricMatcherResult matchAsymmetricMatcherAndGetFlags(JSGlobalObject* globalObject, JSValue matcherProp, JSValue otherProp, ThrowScope* throwScope, ExpectFlags& flags)
{
+ // Add check to ensure matcherProp is actually a cell before calling asCell()
+ if (!matcherProp.isCell()) {
+ return AsymmetricMatcherResult::NOT_MATCHER;
+ }
+
JSCell* matcherPropCell = matcherProp.asCell();
AsymmetricMatcherConstructorType constructorType = AsymmetricMatcherConstructorType::none;