Summary: | [Cleanup] Cleanup uses of the FileList class | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||
Component: | New Bugs | Assignee: | Sam Weinig <sam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, buildbot, cdumez, commit-queue, darin, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Sam Weinig
2017-09-12 13:13:06 PDT
Created attachment 320564 [details]
Patch
Attachment 320564 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/gtk/DragDataGtk.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
Total errors found: 1 in 14 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 320568 [details]
Patch
Attachment 320568 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/gtk/DragDataGtk.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
Total errors found: 1 in 14 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 320568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320568&action=review > Source/WebCore/bindings/js/SerializedScriptValue.cpp:2700 > if (!readFile(file)) > return JSValue(); > if (m_isDOMGlobalObject) > - files.append(WTFMove(file)); > + files.append(file.releaseNonNull()); This would be nicer if you made readFile take no parameters and return a RefPtr. Comment on attachment 320568 [details] Patch Clearing flags on attachment: 320568 Committed r222025: <http://trac.webkit.org/changeset/222025> All reviewed patches have been landed. Closing bug. Comment on attachment 320568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320568&action=review > Source/WebCore/html/FileInputType.cpp:156 > + auto* fileList = element().files(); > + ASSERT(fileList); I would write: ASSERT(element().files()); auto& fileList = *element().files(); > Source/WebCore/html/FormController.h:48 > + m_values.append(value); Can this be done more efficiently? Seems like this will allocate a larger Vector than is needed. (In reply to Darin Adler from comment #8) > Comment on attachment 320568 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=320568&action=review > > > Source/WebCore/html/FileInputType.cpp:156 > > + auto* fileList = element().files(); > > + ASSERT(fileList); > > I would write: > > ASSERT(element().files()); > auto& fileList = *element().files(); > > > Source/WebCore/html/FormController.h:48 > > + m_values.append(value); > > Can this be done more efficiently? Seems like this will allocate a larger > Vector than is needed. Thanks. I'll address these with https://bugs.webkit.org/show_bug.cgi?id=177004. |