[webkit-changes] [WebKit/WebKit] b12bca: Stop using Vector::unsafeAppendWithoutCapacityChec...
Chris Dumez
noreply at github.com
Mon Nov 20 09:58:07 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b12bca52a799310cd7338160834a167d4ca67252
https://github.com/WebKit/WebKit/commit/b12bca52a799310cd7338160834a167d4ca67252
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-11-20 (Mon, 20 Nov 2023)
Changed paths:
M Source/JavaScriptCore/runtime/JSObject.cpp
M Source/WTF/wtf/Vector.h
Log Message:
-----------
Stop using Vector::unsafeAppendWithoutCapacityCheck() in JSObject::putOwnDataPropertyBatching()
https://bugs.webkit.org/show_bug.cgi?id=265084
Reviewed by Darin Adler.
Update the `Vector<T>(size_t, Functor)` to abort appending if the Functor
returns a std::optional<T> type that is std::nullopt.
Adopt it in JSObject::putOwnDataPropertyBatching() to avoid calling
Vector::unsafeAppendWithoutCapacityCheck() explicitly.
* Source/JavaScriptCore/runtime/JSObject.cpp:
(JSC::JSObject::putOwnDataPropertyBatching):
* Source/WTF/wtf/Vector.h:
(WTF::Vector::Vector):
Canonical link: https://commits.webkit.org/270980@main
More information about the webkit-changes
mailing list