[webkit-reviews] review granted: [Bug 130601] Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in bridge/ : [Attachment 227448] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 21 09:59:39 PDT 2014
Darin Adler <darin at apple.com> has granted Sergio Villar Senin
<svillar at igalia.com>'s request for review:
Bug 130601: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
in bridge/
https://bugs.webkit.org/show_bug.cgi?id=130601
Attachment 227448: Patch
https://bugs.webkit.org/attachment.cgi?id=227448&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=227448&action=review
> Source/WebCore/bridge/runtime_root.cpp:65
> - RootObjectSet::const_iterator end = rootObjectSet()->end();
> - for (RootObjectSet::const_iterator it = rootObjectSet()->begin(); it !=
end; ++it) {
> + RootObjectSet::const_iterator end = rootObjectSet().end();
> + for (RootObjectSet::const_iterator it = rootObjectSet().begin(); it !=
end; ++it) {
> if ((*it)->gcIsProtected(jsObject))
> return *it;
> }
I would’ve switched to a new style for loop if I had to touch this code for
another reason.
for (auto* rootObject : rootObjectSet()) {
if (rootObject->gcIsProtected(jsObject))
return rootObject;
}
> Source/WebCore/bridge/runtime_root.cpp:75
> - RootObjectSet::const_iterator end = rootObjectSet()->end();
> - for (RootObjectSet::const_iterator it = rootObjectSet()->begin(); it !=
end; ++it) {
> + RootObjectSet::const_iterator end = rootObjectSet().end();
> + for (RootObjectSet::const_iterator it = rootObjectSet().begin(); it !=
end; ++it) {
> if ((*it)->globalObject() == globalObject)
> return *it;
> }
I would’ve switched to a new style for loop if I had to touch this code for
another reason.
for (auto* rootObject : rootObjectSet()) {
if (rootObject->globalObject() == globalObject)
return rootObject;
}
More information about the webkit-reviews
mailing list