| Index: third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js b/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js
|
| index 30381196fbdd2cb9159465d5a26fb1be8176c63d..1019627c53da5f41c0ef078765283c082d7c8c1a 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js
|
| @@ -285,7 +285,7 @@ InspectorBackendClass.Connection.prototype = {
|
| var wrappedCallback = this._wrap(callback, domain, method);
|
|
|
| if (InspectorBackendClass.Options.dumpInspectorProtocolMessages)
|
| - this._dumpProtocolMessage("frontend: " + JSON.stringify(messageObject));
|
| + this._dumpProtocolMessage("frontend: ", messageObject);
|
|
|
| this.sendMessage(messageObject);
|
| ++this._pendingResponsesCount;
|
| @@ -324,11 +324,11 @@ InspectorBackendClass.Connection.prototype = {
|
| */
|
| dispatch: function(message)
|
| {
|
| - if (InspectorBackendClass.Options.dumpInspectorProtocolMessages)
|
| - this._dumpProtocolMessage("backend: " + ((typeof message === "string") ? message : JSON.stringify(message)));
|
| -
|
| var messageObject = /** @type {!Object} */ ((typeof message === "string") ? JSON.parse(message) : message);
|
|
|
| + if (InspectorBackendClass.Options.dumpInspectorProtocolMessages)
|
| + this._dumpProtocolMessage("backend: ", messageObject);
|
| +
|
| if ("id" in messageObject) { // just a response for some request
|
| var callback = this._callbacks[messageObject.id];
|
| if (!callback) {
|
| @@ -405,9 +405,9 @@ InspectorBackendClass.Connection.prototype = {
|
| }
|
| },
|
|
|
| - _dumpProtocolMessage: function(message)
|
| + _dumpProtocolMessage: function(message, messageObject)
|
| {
|
| - console.log(message);
|
| + console.log.call(console, message, messageObject);
|
| },
|
|
|
| /**
|
| @@ -635,7 +635,7 @@ InspectorBackendClass.AgentPrototype.prototype = {
|
| {
|
| if (messageObject.error && messageObject.error.code !== InspectorBackendClass._DevToolsErrorCode && messageObject.error.code !== InspectorBackendClass.DevToolsStubErrorCode && !InspectorBackendClass.Options.suppressRequestErrors && !this._suppressErrorLogging) {
|
| var id = InspectorBackendClass.Options.dumpInspectorProtocolMessages ? " with id = " + messageObject.id : "";
|
| - console.error("Request " + methodName + id + " failed. " + JSON.stringify(messageObject.error));
|
| + console.error("Request " + methodName + id + " failed. ", messageObject.error);
|
| }
|
|
|
| var argumentsArray = [];
|
|
|