Skip to content

Commit 677b734

Browse files
JosephPecorarowebkit-commit-queue
authored andcommitted
Add a few more ASCIILiterals
https://bugs.webkit.org/show_bug.cgi?id=125662 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-12 Reviewed by Darin Adler. * inspector/InspectorBackendDispatcher.cpp: (Inspector::InspectorBackendDispatcher::dispatch): Canonical link: https://commits.webkit.org/143695@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 5408609 commit 677b734

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

Source/JavaScriptCore/ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2013-12-12 Joseph Pecoraro <pecoraro@apple.com>
2+
3+
Add a few more ASCIILiterals
4+
https://bugs.webkit.org/show_bug.cgi?id=125662
5+
6+
Reviewed by Darin Adler.
7+
8+
* inspector/InspectorBackendDispatcher.cpp:
9+
(Inspector::InspectorBackendDispatcher::dispatch):
10+
111
2013-12-12 Joseph Pecoraro <pecoraro@apple.com>
212

313
Test new JSContext name APIs

Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,43 +80,43 @@ void InspectorBackendDispatcher::dispatch(const String& message)
8080

8181
RefPtr<InspectorValue> parsedMessage = InspectorValue::parseJSON(message);
8282
if (!parsedMessage) {
83-
reportProtocolError(nullptr, ParseError, "Message must be in JSON format");
83+
reportProtocolError(nullptr, ParseError, ASCIILiteral("Message must be in JSON format"));
8484
return;
8585
}
8686

8787
RefPtr<InspectorObject> messageObject = parsedMessage->asObject();
8888
if (!messageObject) {
89-
reportProtocolError(nullptr, InvalidRequest, "Message must be a JSONified object");
89+
reportProtocolError(nullptr, InvalidRequest, ASCIILiteral("Message must be a JSONified object"));
9090
return;
9191
}
9292

9393
RefPtr<InspectorValue> callIdValue = messageObject->get("id");
9494
if (!callIdValue) {
95-
reportProtocolError(nullptr, InvalidRequest, "'id' property was not found");
95+
reportProtocolError(nullptr, InvalidRequest, ASCIILiteral("'id' property was not found"));
9696
return;
9797
}
9898

9999
long callId = 0;
100100
if (!callIdValue->asNumber(&callId)) {
101-
reportProtocolError(nullptr, InvalidRequest, "The type of 'id' property must be number");
101+
reportProtocolError(nullptr, InvalidRequest, ASCIILiteral("The type of 'id' property must be number"));
102102
return;
103103
}
104104

105105
RefPtr<InspectorValue> methodValue = messageObject->get("method");
106106
if (!methodValue) {
107-
reportProtocolError(&callId, InvalidRequest, "'method' property wasn't found");
107+
reportProtocolError(&callId, InvalidRequest, ASCIILiteral("'method' property wasn't found"));
108108
return;
109109
}
110110

111111
String method;
112112
if (!methodValue->asString(&method)) {
113-
reportProtocolError(&callId, InvalidRequest, "The type of 'method' property must be string");
113+
reportProtocolError(&callId, InvalidRequest, ASCIILiteral("The type of 'method' property must be string"));
114114
return;
115115
}
116116

117117
size_t position = method.find('.');
118118
if (position == WTF::notFound) {
119-
reportProtocolError(&callId, InvalidRequest, "The 'method' property was formatted incorrectly. It should be 'Domain.method'");
119+
reportProtocolError(&callId, InvalidRequest, ASCIILiteral("The 'method' property was formatted incorrectly. It should be 'Domain.method'"));
120120
return;
121121
}
122122

0 commit comments

Comments
 (0)