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

WebScriptObject: Refactor getListFromNSArray to use a for-in loop #11439

Conversation

AtariDreams
Copy link
Contributor

@AtariDreams AtariDreams commented Mar 13, 2023

@AtariDreams AtariDreams force-pushed the eng/getListFromNSArray-should-use-a-for-in-loop branch from 9c41fdd to 503914d Compare March 13, 2023 14:36
@AtariDreams AtariDreams changed the title WebScriptObject: Refactor to use for-in loop WebScriptObject: Refactor getListFromNSArray to use a for-in loop Mar 13, 2023
@Ahmad-S792 Ahmad-S792 added the WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit). label Mar 13, 2023
@AtariDreams AtariDreams force-pushed the eng/getListFromNSArray-should-use-a-for-in-loop branch from 503914d to 9f92b20 Compare March 13, 2023 15:21
@AtariDreams AtariDreams force-pushed the eng/getListFromNSArray-should-use-a-for-in-loop branch from 9f92b20 to c796cab Compare March 13, 2023 15:26
Copy link
Contributor

@aproskuryakov aproskuryakov left a comment

Choose a reason for hiding this comment

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

Good change. Please remove the braces around what's now a single line block: https://webkit.org/code-style-guidelines/#braces

@AtariDreams
Copy link
Contributor Author

Good change. Please remove the braces around what's now a single line block: https://webkit.org/code-style-guidelines/#braces

Done!

@AtariDreams AtariDreams force-pushed the eng/getListFromNSArray-should-use-a-for-in-loop branch 2 times, most recently from 6b53d04 to 1b52e9e Compare March 14, 2023 00:36
@aproskuryakov aproskuryakov added the merge-queue Applied to send a pull request to merge-queue label Mar 14, 2023
https://bugs.webkit.org/show_bug.cgi?id=253823

Reviewed by Alexey Proskuryakov.

This makes the code cleaner and more terse.

* Source\WebCore\bridge\objc\WebScriptObject.mm:(getListFromNSArray):
  Prefer for-in loop over regular for loop for iteration of an NSArray.

Canonical link: https://commits.webkit.org/261607@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/getListFromNSArray-should-use-a-for-in-loop branch from 1b52e9e to 5b1535c Compare March 14, 2023 01:36
@webkit-commit-queue
Copy link
Collaborator

Committed 261607@main (5b1535c): https://commits.webkit.org/261607@main

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

@webkit-commit-queue webkit-commit-queue merged commit 5b1535c into WebKit:main Mar 14, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 14, 2023
@AtariDreams AtariDreams deleted the eng/getListFromNSArray-should-use-a-for-in-loop branch March 14, 2023 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
Projects
None yet
5 participants