aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-21 22:36:45 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-22 00:04:27 -0700
commitee1d506d0623e295dae61fe257e534b8f1968d05 (patch)
tree4bf4fb999d6f3d0fec052304bd52455d74905644
parentd62050075756088cc0f55416c1754f43a08cd2be (diff)
downloadbun-ee1d506d0623e295dae61fe257e534b8f1968d05.tar.gz
bun-ee1d506d0623e295dae61fe257e534b8f1968d05.tar.zst
bun-ee1d506d0623e295dae61fe257e534b8f1968d05.zip
Use `jsCast` because it's slightly faster
-rw-r--r--src/bun.js/bindings/webcore/JSEventEmitterCustom.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/bindings/webcore/JSEventEmitterCustom.cpp b/src/bun.js/bindings/webcore/JSEventEmitterCustom.cpp
index 0d11b9350..53220536d 100644
--- a/src/bun.js/bindings/webcore/JSEventEmitterCustom.cpp
+++ b/src/bun.js/bindings/webcore/JSEventEmitterCustom.cpp
@@ -34,7 +34,7 @@ std::unique_ptr<JSEventEmitterWrapper> jsEventEmitterCast(VM& vm, JSC::JSGlobalO
value = WebCore::toJSNewlyCreated(lexicalGlobalObject, globalObject, EventEmitter::create(*globalObject->scriptExecutionContext()));
object->putDirect(vm, emitterTag, value);
}
- auto* target = jsDynamicCast<JSEventEmitter*>(value);
+ auto* target = jsCast<JSEventEmitter*>(value);
return makeUnique<JSEventEmitterWrapper>(target->wrapped(), *target);
}