Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WTF::map() in ScriptArguments::getArgumentsAsStrings() instead of uncheckedAppend() #18527

Merged

Conversation

cdumez
Copy link
Contributor

@cdumez cdumez commented Oct 3, 2023

9152805

Use WTF::map() in ScriptArguments::getArgumentsAsStrings() instead of uncheckedAppend()
https://bugs.webkit.org/show_bug.cgi?id=262519

Reviewed by Darin Adler.

Use WTF::map() in `ScriptArguments::getArgumentsAsStrings()` instead of `uncheckedAppend()`.
It is more efficient, now that `uncheckedAppend()` is just an alias to `append()`.

* Source/JavaScriptCore/inspector/ScriptArguments.cpp:
(Inspector::argumentAsString):
(Inspector::ScriptArguments::getArgumentAtIndexAsString const):
(Inspector::ScriptArguments::getArgumentsAsStrings const):

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

6ee2394

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
βœ… πŸ›  πŸ§ͺ jsc βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ›  jsc-armv7
βœ… πŸ›  tv-sim βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ›  jsc-mips
βœ… πŸ›  watch-sim βœ… πŸ§ͺ jsc-mips-tests

@cdumez cdumez self-assigned this Oct 3, 2023
@cdumez cdumez added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Oct 3, 2023
@cdumez cdumez marked this pull request as ready for review October 3, 2023 04:40
if (JSC::jsDynamicCast<JSC::ProxyObject*>(argument))
return "[object Proxy]"_s;

String result;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have to be defined here instead of where it is initialized.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I just moved the code as is but I don't think there is a reason to defined it here. I'll update.

@cdumez cdumez force-pushed the 262519_argumentsAsStrings_WTF_map branch from ee534c3 to 6ee2394 Compare October 3, 2023 16:41
@cdumez cdumez added the merge-queue Applied to send a pull request to merge-queue label Oct 3, 2023
… uncheckedAppend()

https://bugs.webkit.org/show_bug.cgi?id=262519

Reviewed by Darin Adler.

Use WTF::map() in `ScriptArguments::getArgumentsAsStrings()` instead of `uncheckedAppend()`.
It is more efficient, now that `uncheckedAppend()` is just an alias to `append()`.

* Source/JavaScriptCore/inspector/ScriptArguments.cpp:
(Inspector::argumentAsString):
(Inspector::ScriptArguments::getArgumentAtIndexAsString const):
(Inspector::ScriptArguments::getArgumentsAsStrings const):

Canonical link: https://commits.webkit.org/268793@main
@webkit-commit-queue
Copy link
Collaborator

Committed 268793@main (9152805): https://commits.webkit.org/268793@main

Reviewed commits have been landed. Closing PR #18527 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 9152805 into WebKit:main Oct 3, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Projects
None yet
4 participants