diff --git a/Source/JavaScriptCore/parser/SourceCodeKey.h b/Source/JavaScriptCore/parser/SourceCodeKey.h index 4e1277a43589b..21f90b77e8d71 100644 --- a/Source/JavaScriptCore/parser/SourceCodeKey.h +++ b/Source/JavaScriptCore/parser/SourceCodeKey.h @@ -117,11 +117,7 @@ class SourceCodeKey { && m_functionConstructorParametersEndPosition == other.m_functionConstructorParametersEndPosition && m_name == other.m_name && host() == other.host() -#if USE(BUN_JSC_ADDITIONS) - ; -#else && (m_sourceCode == other.m_sourceCode || string() == other.string()); -#endif } struct HashTraits : SimpleClassHashTraits { diff --git a/Source/JavaScriptCore/runtime/CachedTypes.cpp b/Source/JavaScriptCore/runtime/CachedTypes.cpp index a9afda484de10..d549ae9cc0e8b 100644 --- a/Source/JavaScriptCore/runtime/CachedTypes.cpp +++ b/Source/JavaScriptCore/runtime/CachedTypes.cpp @@ -1647,10 +1647,9 @@ class CachedStringSourceProvider : public CachedSourceProviderShape provider = decoder.provider()) { - if (provider->sourceType() == sourceType && provider->source().length() == m_sourceLength) + if (provider->source().length() == m_sourceLength) return provider.leakRef(); } - // Fallback for callers that did not supply a provider: decode without source - // bytes. SourceCodeKey::operator== ignores string(), but length() is compared, - // so synthesize a provider whose source() is empty — length() will mismatch - // and the cache entry will be rejected, which is the conservative behaviour. + // No provider supplied (isCachedBytecodeStillValid, decodeSourceCodeKey): the + // empty-source provider makes string() mismatch the runtime key, so the cache + // entry is conservatively rejected. String decodedSource; #else String decodedSource = m_source.decode(decoder);