Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 36fdbef0da0d7356beabaa5db6ded607da4c0c81
      
https://github.com/WebKit/WebKit/commit/36fdbef0da0d7356beabaa5db6ded607da4c0c81
  Author: Alexey Shvayka <[email protected]>
  Date:   2024-10-05 (Sat, 05 Oct 2024)

  Changed paths:
    M JSTests/stress/iterator-prototype-forEach.js
    M Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp

  Log Message:
  -----------
  [JSC] Iterator.prototype.forEach() crashes if invoked with callable 
non-JSFunction argument
https://bugs.webkit.org/show_bug.cgi?id=280867
<rdar://problem/137247144>

Reviewed by Yusuke Suzuki.

CachedCall requires a JSFunction, while isCallable() is way more permissive and 
allows wider variety
of objects (e.g. ProxyObject) that can't be just casted to JSFunction, so this 
patch introduces a
slower path for non-JSFunction callbacks.

Also, removes unnecessary includes and identifier creation.

* JSTests/stress/iterator-prototype-forEach.js:
(sameArray):
* Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp:
(JSC::JSIteratorPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/284738@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