Reviewed by Yury Semikhatsky.
Web Inspector: Remove unnecessary domain and success flags from the response messages.
https://bugs.webkit.org/show_bug.cgi?id=55768
We have domain property in the response messages but it is not used because we dispatch
the responses on the callback associated with seq.
If we have property 'errors' in the response then success eq false and true in the other case.
* inspector/protocol/runtime-agent-expected.txt:
* inspector/report-protocol-errors-expected.txt:
2011-03-04 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: Remove unnecessary domain and success flags from the response messages.
https://bugs.webkit.org/show_bug.cgi?id=55768
We have domain property in the response messages but it is not used because we dispatch
the responses on the callback associated with seq.
If we have property 'errors' in the response then success eq false and true in the other case.
* inspector/CodeGeneratorInspector.pm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80345
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-03-04 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Remove unnecessary domain and success flags from the response messages.
+ https://bugs.webkit.org/show_bug.cgi?id=55768
+
+ We have domain property in the response messages but it is not used because we dispatch
+ the responses on the callback associated with seq.
+
+ If we have property 'errors' in the response then success eq false and true in the other case.
+
+ * inspector/protocol/runtime-agent-expected.txt:
+ * inspector/report-protocol-errors-expected.txt:
+
2011-03-04 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed.
response:
{
seq : <number>
- domain : "Runtime"
- success : true
body : {
result : {
objectId : {
response:
{
seq : <number>
- domain : "Runtime"
- success : true
body : {
result : {
objectId : null
response:
{
seq : <number>
- domain : "Runtime"
- success : true
body : {
result : true
}
response:
{
seq : <number>
- domain : "Runtime"
- success : true
body : {
result : true
}
response:
{
seq : <number>
- domain : "Runtime"
- success : true
body : {
result : {
0 : {
response:
{
seq : <number>
- domain : "Runtime"
- success : true
}
-----------------------------------------------------------
response:
{
seq : <number>
- domain : "Runtime"
- success : true
}
===========================================================
{
seq : 0
- success : false
errors : {
0 : "Protocol Error: Invalid message format. Message should be in JSON format."
}
}
{
seq : 0
- success : false
errors : {
0 : "Protocol Error: Invalid message format. 'command' property wasn't found."
}
}
{
seq : 0
- success : false
errors : {
0 : "Protocol Error: Invalid message format. The type of 'command' property should be string."
}
}
{
seq : 0
- success : false
errors : {
0 : "Protocol Error: Invalid message format. 'seq' property was not found in the request."
}
}
{
seq : 0
- success : false
errors : {
0 : "Protocol Error: Invalid message format. The type of 'seq' property should be number."
}
}
{
seq : 1
- success : false
errors : {
0 : "Protocol Error: Invalid command was received. 'test' wasn't found in domain DOM."
}
}
{
seq : 2
- domain : "Network"
- success : false
errors : {
0 : "Protocol Error: 'arguments' property with type 'object' was not found."
}
}
{
seq : 3
- domain : "Network"
- success : false
errors : {
0 : "Protocol Error: 'arguments' property with type 'object' was not found."
}
}
{
seq : 4
- domain : "Network"
- success : false
errors : {
0 : "Protocol Error: Argument 'frameId' with type 'Number' was not found."
1 : "Protocol Error: Argument 'url' with type 'String' was not found."
}
{
seq : 5
- domain : "Network"
- success : false
errors : {
0 : "Protocol Error: Argument 'frameId' with type 'Number' was not found."
1 : "Protocol Error: Argument 'url' with type 'String' was not found."
+2011-03-04 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Remove unnecessary domain and success flags from the response messages.
+ https://bugs.webkit.org/show_bug.cgi?id=55768
+
+ We have domain property in the response messages but it is not used because we dispatch
+ the responses on the callback associated with seq.
+
+ If we have property 'errors' in the response then success eq false and true in the other case.
+
+ * inspector/CodeGeneratorInspector.pm:
+
2011-03-04 Christian Dywan <christian@lanedo.com>
Reviewed by Gustavo Noronha Silva.
push(@function, " if ((callId || protocolErrors->length()) && m_inspectorAgent->hasFrontend()) {");
push(@function, " RefPtr<InspectorObject> responseMessage = InspectorObject::create();");
push(@function, " responseMessage->setNumber(\"seq\", callId);");
- push(@function, " responseMessage->setString(\"domain\", \"$domain\");");
- push(@function, " responseMessage->setBoolean(\"success\", !protocolErrors->length());");
push(@function, "");
push(@function, " if (protocolErrors->length())");
push(@function, " responseMessage->setArray(\"errors\", protocolErrors);");
{
RefPtr<InspectorObject> message = InspectorObject::create();
message->setNumber("seq", callId);
- message->setBoolean("success", false);
RefPtr<InspectorArray> errors = InspectorArray::create();
errors->pushString(errorText);
message->setArray("errors", errors);
arguments.push(messageObject.body[key]);
if ("seq" in messageObject) { // just a response for some request
- if (messageObject.success)
+ if (!messageObject.errors)
this._callbacks[messageObject.seq].apply(null, arguments);
else
this.reportProtocolError(messageObject);