RESOLVED FIXED 144769
Pass String as reference in more places
https://bugs.webkit.org/show_bug.cgi?id=144769
Summary Pass String as reference in more places
Joseph Pecoraro
Reported 2015-05-07 15:21:58 PDT
* SUMMARY Pass String as reference in more places. This covers all cases where a String was being passed as not a reference in JavaScriptCore. And a sprinkle of cases in WebCore/WebKit2. This doesn't cover all cases there because there are many.
Attachments
[PATCH] Proposed Fix (35.18 KB, patch)
2015-05-07 16:59 PDT, Joseph Pecoraro
dbates: review+
Joseph Pecoraro
Comment 1 2015-05-07 16:59:49 PDT
Created attachment 252654 [details] [PATCH] Proposed Fix Use "const String&" in places where parameters were passing just a "String".
WebKit Commit Bot
Comment 2 2015-05-07 17:00:52 PDT
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`)
Daniel Bates
Comment 3 2015-05-07 23:44:05 PDT
Comment on attachment 252654 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=252654&action=review > Source/JavaScriptCore/parser/Parser.h:656 > + void setErrorMessage(const String& msg) For your consideration, I suggest we rename msg to message. > Source/JavaScriptCore/parser/Parser.h:670 > + NEVER_INLINE void updateErrorWithNameAndMessage(const char* beforeMsg, const String& name, const char* afterMsg) For your consideration, I suggest we rename beforeMsg and afterMsg to beforeMessage and afterMessage, respectively. > Source/WebCore/bindings/js/SerializedScriptValue.cpp:684 > + void dumpString(const String& str) For your consideration, I suggest we rename parameter str to string. > Source/WebCore/bindings/js/SerializedScriptValue.cpp:694 > + void dumpStringObject(const String& str) Ditto.
Joseph Pecoraro
Comment 4 2015-05-13 11:53:34 PDT
Note You need to log in before you can comment on or make changes to this bug.