Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 05cdfcbb72aa9ab91d3d62a2ac8fc8a2d64ee694
      
https://github.com/WebKit/WebKit/commit/05cdfcbb72aa9ab91d3d62a2ac8fc8a2d64ee694
  Author: Yusuke Suzuki <[email protected]>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  Changed paths:
    M Source/JavaScriptCore/runtime/FunctionConstructor.cpp
    M Source/JavaScriptCore/runtime/FunctionExecutable.cpp
    M Source/JavaScriptCore/runtime/FunctionExecutable.h
    M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
    M Source/JavaScriptCore/runtime/JSGlobalObject.h
    M Source/JavaScriptCore/runtime/JSString.h
    M Source/JavaScriptCore/runtime/JSStringInlines.h

  Log Message:
  -----------
  [JSC] Do not resolve rope when constructing Function
https://bugs.webkit.org/show_bug.cgi?id=294878
rdar://154145026

Reviewed by Yijia Huang.

Let's avoid resolving string for input for Function constructor.
It is not so super efficient if we resolve them. We also avoid creating
SourceCode so that we do not need to allocate StringSourceProvider.

* Source/JavaScriptCore/runtime/FunctionConstructor.cpp:
(JSC::stringifyFunction):
(JSC::constructFunction):
(JSC::constructFunctionSkippingEvalEnabledCheck):
* Source/JavaScriptCore/runtime/FunctionExecutable.cpp:
(JSC::FunctionExecutable::fromGlobalCode):
* Source/JavaScriptCore/runtime/FunctionExecutable.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::tryGetCachedFunctionExecutableForFunctionConstructor):
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
* Source/JavaScriptCore/runtime/JSString.h:
(WTF::StringTypeAdapter<JSC::JSString::StringTypeAdapter):
(WTF::StringTypeAdapter<JSC::JSString::length const):
(WTF::StringTypeAdapter<JSC::JSString::is8Bit const):
(WTF::StringTypeAdapter<JSC::JSString::writeTo const):
* Source/JavaScriptCore/runtime/JSStringInlines.h:
(JSC::JSString::resolveToBuffer):

Canonical link: https://commits.webkit.org/296661@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to