| Summary: | Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in bridge/ | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sergio Villar Senin <svillar> | ||||
| Component: | New Bugs | Assignee: | Sergio Villar Senin <svillar> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | barraclough, darin, kling, mjs, simon.fraser | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 130185 | ||||||
| Attachments: |
|
||||||
|
Description
Sergio Villar Senin
2014-03-21 09:48:25 PDT
Created attachment 227448 [details]
Patch
Comment on attachment 227448 [details] Patch 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; } Committed r166071: <http://trac.webkit.org/changeset/166071> |