Summary: | Remove scopeguard from platform | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Christopher Reid <chris.reid> | ||||||||||||||||||||
Component: | Platform | Assignee: | Nobody <webkit-unassigned> | ||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||
Severity: | Normal | CC: | achristensen, alecflett, beidson, benjamin, buildbot, cdumez, chris.reid, cmarcelo, commit-queue, dbates, don.olmstead, jsbell, mmaxfield, sam, webkit-bug-importer | ||||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||
Attachments: |
|
Description
Christopher Reid
2017-10-23 14:18:58 PDT
Created attachment 324604 [details]
Patch
Attachment 324604 [details] did not pass style-queue:
ERROR: Source/WebCore/Modules/indexeddb/IDBRequest.h:40: Code inside a namespace should not be indented. [whitespace/indent] [4]
ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5]
ERROR: Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:31: Alphabetical sorting problem. [build/include_order] [4]
Total errors found: 3 in 15 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 324606 [details]
Patch
Fixing style issues
Created attachment 324610 [details]
Patch
Patch - Fixing a poorly merged line
I'm surprised so few places use this. Regardless, there's nothing "Platform" about this class - It belongs in WTF WTF already has ScopeExit, which looks similar. Maybe we can just remove ScopeGuard. Created attachment 324764 [details]
patch
Here's a patch replacing Webcore::ScopeGuard with WTF::ScopeExit
Attachment 324764 [details] did not pass style-queue:
ERROR: Source/WebCore/workers/service/ServiceWorkerContainer.cpp:45: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebKit/Shared/mac/ChildProcessMac.mm:39: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebCore/platform/FileSystem.cpp:31: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:48: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebCore/platform/network/BlobRegistryImpl.cpp:44: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:31: Alphabetical sorting problem. [build/include_order] [4]
Total errors found: 6 in 11 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 324765 [details]
Patch
Fixing style issues for scopeguard removal patch
Created attachment 324766 [details]
Patch
Accidentally uploaded an older patch
Comment on attachment 324766 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=324766&action=review > Source/WebCore/Modules/indexeddb/IDBRequest.h:174 > + std::unique_ptr<WTF::ScopeExit<std::function<void()>>> m_cursorRequestNotifier; Is there a reason this needs to be std::function? We're trying to use WTF::Function instead because it's non-copyable. (In reply to Alex Christensen from comment #11) > Comment on attachment 324766 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=324766&action=review > > > Source/WebCore/Modules/indexeddb/IDBRequest.h:174 > > + std::unique_ptr<WTF::ScopeExit<std::function<void()>>> m_cursorRequestNotifier; > > Is there a reason this needs to be std::function? We're trying to use > WTF::Function instead because it's non-copyable. For some reason I thought ScopeGuard was using std::function, but I was mistaken. I'll change it to WTF::Function. Created attachment 324932 [details]
Patch
Using WTF::Function instead of std::function
Attachment 324932 [details] did not pass style-queue:
ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5]
Total errors found: 1 in 12 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 324934 [details]
Patch
Using WTF::Function instead of std::function - Fixing style issue
Created attachment 324938 [details]
Patch
Using WTF::Function instead of std::function -- Missed a new scope guard that was added today :(
Comment on attachment 324938 [details]
Patch
LGTM once EWS is all green.
Comment on attachment 324938 [details] Patch Clearing flags on attachment: 324938 Committed r224018: <https://trac.webkit.org/changeset/224018> All reviewed patches have been landed. Closing bug. |