Bug 143970

Summary: Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, benjamin, commit-queue, kling, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=143925
Attachments:
Description Flags
Patch
none
Patch
none
Patch darin: review+

Chris Dumez
Reported 2015-04-20 15:39:53 PDT
Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit as it copies the vector and it is easy to call it by mistake.
Attachments
Patch (25.38 KB, patch)
2015-04-20 15:42 PDT, Chris Dumez
no flags
Patch (25.38 KB, patch)
2015-04-20 16:14 PDT, Chris Dumez
no flags
Patch (26.24 KB, patch)
2015-04-20 16:58 PDT, Chris Dumez
darin: review+
Chris Dumez
Comment 1 2015-04-20 15:42:03 PDT
WebKit Commit Bot
Comment 2 2015-04-20 15:44:09 PDT
Attachment 251195 [details] did not pass style-queue: ERROR: Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:71: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:308: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 3 2015-04-20 16:14:46 PDT
WebKit Commit Bot
Comment 4 2015-04-20 16:16:52 PDT
Attachment 251199 [details] did not pass style-queue: ERROR: Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:71: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:308: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 5 2015-04-20 16:58:05 PDT
WebKit Commit Bot
Comment 6 2015-04-20 17:00:31 PDT
Attachment 251205 [details] did not pass style-queue: ERROR: Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:71: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:308: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 23 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 7 2015-04-21 08:44:27 PDT
Comment on attachment 251205 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251205&action=review > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:155 > + BlockList preOrder = m_graph.blocksInPreOrder(); How about auto? > Source/WebCore/rendering/RenderGrid.cpp:174 > + const auto& children = m_grid[row][column]; I think in a case like the the "const" does little good. If the object is already const, then auto& keeps it const. If it’s not already const, then all const does is make it non-modifiable for like one line of code below, at the expense of adding another word! Yuck.
Chris Dumez
Comment 8 2015-04-21 09:19:28 PDT
Note You need to log in before you can comment on or make changes to this bug.