Skip to content

Commit f987d1e

Browse files
Update Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Co-authored-by: Jarred Sumner <[email protected]>
1 parent d521fee commit f987d1e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,8 @@ IGNORE_GCC_WARNINGS_END
792792
#if USE(BUN_JSC_ADDITIONS)
793793
if (m_isBuiltinFunction) {
794794
const auto isDefaultPromiseForBun = [&]() -> bool {
795-
if (auto* provider = m_scopeNode->source().provider()) {
796-
const String& sourceURL = provider->sourceURL();
797-
if (!sourceURL.isNull() && !sourceURL.isEmpty())
798-
return sourceURL == "node:fs/promises"_s;
799-
}
795+
if (auto* provider = m_scopeNode->source().provider())
796+
return !provider->sourceURL().isEmpty();
800797
return false;
801798
};
802799
isInternalPromise = !functionNode->ident().string().startsWith("defaultAsync"_s) && !isDefaultPromiseForBun();

0 commit comments

Comments
 (0)