Log Message
2011-06-10 Ilya Tikhonovsky <[email protected]> Reviewed by Yury Semikhatsky.
Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens.
https://bugs.webkit.org/show_bug.cgi?id=62377
* inspector/report-protocol-errors-expected.txt:
* inspector/report-protocol-errors.html:
2011-06-11-06-09 Ilya Tikhonovsky <[email protected]>
Reviewed by Yury Semikhatsky.
Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens.
https://bugs.webkit.org/show_bug.cgi?id=62377
* inspector/InspectorValues.cpp:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (88534 => 88535)
--- trunk/LayoutTests/ChangeLog 2011-06-10 10:06:41 UTC (rev 88534)
+++ trunk/LayoutTests/ChangeLog 2011-06-10 10:15:50 UTC (rev 88535)
@@ -1,3 +1,13 @@
+2011-06-10 Ilya Tikhonovsky <[email protected]>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens.
+ https://bugs.webkit.org/show_bug.cgi?id=62377
+
+ * inspector/report-protocol-errors-expected.txt:
+ * inspector/report-protocol-errors.html:
+
2011-06-10 Sheriff Bot <[email protected]>
Unreviewed, rolling out r88530.
Modified: trunk/LayoutTests/inspector/report-protocol-errors-expected.txt (88534 => 88535)
--- trunk/LayoutTests/inspector/report-protocol-errors-expected.txt 2011-06-10 10:06:41 UTC (rev 88534)
+++ trunk/LayoutTests/inspector/report-protocol-errors-expected.txt 2011-06-10 10:15:50 UTC (rev 88535)
@@ -101,4 +101,94 @@
}
id : 7
}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 8
+}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 9
+}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 10
+}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 11
+}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 12
+}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 13
+}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 14
+}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 15
+}
+{
+ error : {
+ code : -32601
+ message : "Method not found."
+ data : [
+ "Invalid method name was received. 'Page.test' wasn't found."
+ ]
+ }
+ id : 16
+}
Modified: trunk/LayoutTests/inspector/report-protocol-errors.html (88534 => 88535)
--- trunk/LayoutTests/inspector/report-protocol-errors.html 2011-06-10 10:06:41 UTC (rev 88534)
+++ trunk/LayoutTests/inspector/report-protocol-errors.html 2011-06-10 10:15:50 UTC (rev 88535)
@@ -16,6 +16,15 @@
'{"id":5,"method":"Page.getResourceContent","params":[]}',
'{"id":6,"method":"Page.getResourceContent","params":{}}',
'{"id":7,"method":"Page.getResourceContent","params":{"frameId":"not a number"}}',
+ '{"id":8,"method":"Page.test"}',
+ '{"id":9,"method":"Page.test" }',
+ '{"id":10,"method": "Page.test" }',
+ '{"id":11,"method" : "Page.test" }',
+ '{"id":12, "method" : "Page.test" }',
+ '{"id": 13, "method" : "Page.test" }',
+ '{"id" : 14, "method" : "Page.test" }',
+ '{ "id" : 15, "method" : "Page.test" }',
+ '{ "id"\n :\r 16,\t "method"\f :\v "Page.test" }',
];
var numberOfReports = 0;
Modified: trunk/Source/WebCore/ChangeLog (88534 => 88535)
--- trunk/Source/WebCore/ChangeLog 2011-06-10 10:06:41 UTC (rev 88534)
+++ trunk/Source/WebCore/ChangeLog 2011-06-10 10:15:50 UTC (rev 88535)
@@ -1,3 +1,12 @@
+2011-06-11-06-09 Ilya Tikhonovsky <[email protected]>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens.
+ https://bugs.webkit.org/show_bug.cgi?id=62377
+
+ * inspector/InspectorValues.cpp:
+
2011-06-10 Sheriff Bot <[email protected]>
Unreviewed, rolling out r88530.
Modified: trunk/Source/WebCore/inspector/InspectorValues.cpp (88534 => 88535)
--- trunk/Source/WebCore/inspector/InspectorValues.cpp 2011-06-10 10:06:41 UTC (rev 88534)
+++ trunk/Source/WebCore/inspector/InspectorValues.cpp 2011-06-10 10:15:50 UTC (rev 88535)
@@ -186,11 +186,16 @@
return false;
}
-Token parseToken(const UChar* start, const UChar* end, const UChar** tokenEnd)
+Token parseToken(const UChar* start, const UChar* end, const UChar** tokenStart, const UChar** tokenEnd)
{
+ while (start < end && isSpaceOrNewline(*start))
+ ++start;
+
if (start == end)
return INVALID_TOKEN;
+ *tokenStart = start;
+
switch (*start) {
case 'n':
if (parseConstToken(start, end, tokenEnd, nullString))
@@ -330,8 +335,9 @@
return 0;
RefPtr<InspectorValue> result;
+ const UChar* tokenStart;
const UChar* tokenEnd;
- Token token = parseToken(start, end, &tokenEnd);
+ Token token = parseToken(start, end, &tokenStart, &tokenEnd);
switch (token) {
case INVALID_TOKEN:
return 0;
@@ -346,7 +352,7 @@
break;
case NUMBER: {
bool ok;
- double value = charactersToDouble(start, tokenEnd - start, &ok);
+ double value = charactersToDouble(tokenStart, tokenEnd - tokenStart, &ok);
if (!ok)
return 0;
result = InspectorBasicValue::create(value);
@@ -354,7 +360,7 @@
}
case STRING: {
String value;
- bool ok = decodeString(start + 1, tokenEnd - 1, &value);
+ bool ok = decodeString(tokenStart + 1, tokenEnd - 1, &value);
if (!ok)
return 0;
result = InspectorString::create(value);
@@ -363,7 +369,7 @@
case ARRAY_BEGIN: {
RefPtr<InspectorArray> array = InspectorArray::create();
start = tokenEnd;
- token = parseToken(start, end, &tokenEnd);
+ token = parseToken(start, end, &tokenStart, &tokenEnd);
while (token != ARRAY_END) {
RefPtr<InspectorValue> arrayNode = buildValue(start, end, &tokenEnd, depth + 1);
if (!arrayNode)
@@ -372,10 +378,10 @@
// After a list value, we expect a comma or the end of the list.
start = tokenEnd;
- token = parseToken(start, end, &tokenEnd);
+ token = parseToken(start, end, &tokenStart, &tokenEnd);
if (token == LIST_SEPARATOR) {
start = tokenEnd;
- token = parseToken(start, end, &tokenEnd);
+ token = parseToken(start, end, &tokenStart, &tokenEnd);
if (token == ARRAY_END)
return 0;
} else if (token != ARRAY_END) {
@@ -391,16 +397,16 @@
case OBJECT_BEGIN: {
RefPtr<InspectorObject> object = InspectorObject::create();
start = tokenEnd;
- token = parseToken(start, end, &tokenEnd);
+ token = parseToken(start, end, &tokenStart, &tokenEnd);
while (token != OBJECT_END) {
if (token != STRING)
return 0;
String key;
- if (!decodeString(start + 1, tokenEnd - 1, &key))
+ if (!decodeString(tokenStart + 1, tokenEnd - 1, &key))
return 0;
start = tokenEnd;
- token = parseToken(start, end, &tokenEnd);
+ token = parseToken(start, end, &tokenStart, &tokenEnd);
if (token != OBJECT_PAIR_SEPARATOR)
return 0;
start = tokenEnd;
@@ -413,10 +419,10 @@
// After a key/value pair, we expect a comma or the end of the
// object.
- token = parseToken(start, end, &tokenEnd);
+ token = parseToken(start, end, &tokenStart, &tokenEnd);
if (token == LIST_SEPARATOR) {
start = tokenEnd;
- token = parseToken(start, end, &tokenEnd);
+ token = parseToken(start, end, &tokenStart, &tokenEnd);
if (token == OBJECT_END)
return 0;
} else if (token != OBJECT_END) {
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
