WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145425
Use modern for-loops in WebCore/plugins, storage, style, testing and workers.
https://bugs.webkit.org/show_bug.cgi?id=145425
Summary
Use modern for-loops in WebCore/plugins, storage, style, testing and workers.
Hunseop Jeong
Reported
2015-05-27 21:10:49 PDT
cleanup for loop with ranged-based for loop.
Attachments
Patch
(15.39 KB, patch)
2015-05-27 21:22 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-mavericks-wk2
(820.73 KB, application/zip)
2015-05-27 22:05 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews100 for mac-mavericks
(669.46 KB, application/zip)
2015-05-27 22:17 PDT
,
Build Bot
no flags
Details
Patch
(14.77 KB, patch)
2015-05-28 00:42 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Patch
(14.95 KB, patch)
2015-05-28 19:13 PDT
,
Hunseop Jeong
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Hunseop Jeong
Comment 1
2015-05-27 21:22:01 PDT
Created
attachment 253828
[details]
Patch
Build Bot
Comment 2
2015-05-27 22:05:42 PDT
Comment on
attachment 253828
[details]
Patch
Attachment 253828
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/4935507167412224
New failing tests: fast/css/style-element-process-crash.html fast/dom/HTMLDocument/object-by-name-or-id.html http/tests/misc/acid2-pixel.html http/tests/misc/acid2.html fast/css/mask-missing-image-crash.html fast/dom/HTMLObjectElement/form/nested-form-element.html fast/css/acid2.html
Build Bot
Comment 3
2015-05-27 22:05:45 PDT
Created
attachment 253833
[details]
Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Build Bot
Comment 4
2015-05-27 22:17:46 PDT
Comment on
attachment 253828
[details]
Patch
Attachment 253828
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/5116671706529792
New failing tests: fast/css/style-element-process-crash.html fast/dom/HTMLDocument/object-by-name-or-id.html http/tests/misc/acid2.html plugins/crash-restoring-plugin-page-from-page-cache.html fast/dom/HTMLObjectElement/form/nested-form-element.html fast/css/acid2.html
Build Bot
Comment 5
2015-05-27 22:17:50 PDT
Created
attachment 253835
[details]
Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Hunseop Jeong
Comment 6
2015-05-28 00:42:44 PDT
Created
attachment 253840
[details]
Patch
Darin Adler
Comment 7
2015-05-28 12:42:43 PDT
Comment on
attachment 253840
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=253840&action=review
> Source/WebCore/plugins/PluginMainThreadScheduler.cpp:98 > { > // Empty all the queues in the original map > - CallQueueMap::iterator end = m_callQueueMap.end(); > - for (CallQueueMap::iterator it = m_callQueueMap.begin(); it != end; ++it) > - it->value.clear(); > + for (auto& call : m_callQueueMap.values()) > + call.clear(); > }
No need for the braces and indentation around this any more. They were there to scope the "end" local variable.
> Source/WebCore/storage/StorageEventDispatcher.cpp:67 > + for (auto& entry : page->group().pages()) {
I think we should call this "pageInGroup" instead of "entry".
> Source/WebCore/workers/WorkerGlobalScope.cpp:180 > + const URL& url = scriptExecutionContext()->completeURL(entry);
This would be more efficient if it was URL, not const URL& and ...
> Source/WebCore/workers/WorkerGlobalScope.cpp:185 > completedURLs.append(url);
... this used WTF::move(url).
Hunseop Jeong
Comment 8
2015-05-28 19:13:18 PDT
Created
attachment 253889
[details]
Patch
Hunseop Jeong
Comment 9
2015-05-28 19:27:54 PDT
(In reply to
comment #7
)
> Comment on
attachment 253840
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=253840&action=review
> > > Source/WebCore/plugins/PluginMainThreadScheduler.cpp:98 > > { > > // Empty all the queues in the original map > > - CallQueueMap::iterator end = m_callQueueMap.end(); > > - for (CallQueueMap::iterator it = m_callQueueMap.begin(); it != end; ++it) > > - it->value.clear(); > > + for (auto& call : m_callQueueMap.values()) > > + call.clear(); > > } > > No need for the braces and indentation around this any more. They were there > to scope the "end" local variable.
Removed the braces and indentations.
> > > Source/WebCore/storage/StorageEventDispatcher.cpp:67 > > + for (auto& entry : page->group().pages()) { > > I think we should call this "pageInGroup" instead of "entry".
Done.
> > > Source/WebCore/workers/WorkerGlobalScope.cpp:180 > > + const URL& url = scriptExecutionContext()->completeURL(entry); > > This would be more efficient if it was URL, not const URL& and ... > > > Source/WebCore/workers/WorkerGlobalScope.cpp:185 > > completedURLs.append(url); > > ... this used WTF::move(url).
Done. If I find the code that is similar as your guide, I will modify it.
WebKit Commit Bot
Comment 10
2015-05-29 10:01:32 PDT
Comment on
attachment 253889
[details]
Patch Clearing flags on attachment: 253889 Committed
r184990
: <
http://trac.webkit.org/changeset/184990
>
WebKit Commit Bot
Comment 11
2015-05-29 10:01:49 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug