Changeset 160523 in webkit


Ignore:
Timestamp:
Dec 12, 2013 6:19:25 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Add a few more ASCIILiterals
https://bugs.webkit.org/show_bug.cgi?id=125662

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2013-12-12
Reviewed by Darin Adler.

  • inspector/InspectorBackendDispatcher.cpp:

(Inspector::InspectorBackendDispatcher::dispatch):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r160494 r160523  
     12013-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
    1112013-12-12  Joseph Pecoraro  <pecoraro@apple.com>
    212
  • trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp

    r160457 r160523  
    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    }
     
    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    }
     
    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    }
     
    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    }
     
    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    }
     
    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    }
     
    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    }
Note: See TracChangeset for help on using the changeset viewer.