| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 * @param {?function(*)} callback | 771 * @param {?function(*)} callback |
| 772 */ | 772 */ |
| 773 _invoke: function(method, args, callback) | 773 _invoke: function(method, args, callback) |
| 774 { | 774 { |
| 775 this._connection._wrapCallbackAndSendMessageObject(this._domain, method,
args, callback); | 775 this._connection._wrapCallbackAndSendMessageObject(this._domain, method,
args, callback); |
| 776 }, | 776 }, |
| 777 | 777 |
| 778 /** | 778 /** |
| 779 * @param {number} messageId | 779 * @param {number} messageId |
| 780 * @param {!Object} messageObject | 780 * @param {!Object} messageObject |
| 781 * @param {string} methodName |
| 782 * @param {function(!Array.<*>)} callback |
| 781 */ | 783 */ |
| 782 dispatchResponse: function(messageId, messageObject, methodName, callback) | 784 dispatchResponse: function(messageId, messageObject, methodName, callback) |
| 783 { | 785 { |
| 784 if (messageObject.error && messageObject.error.code !== -32000) | 786 if (messageObject.error && messageObject.error.code !== -32000) |
| 785 console.error("Request with id = " + messageObject.id + " failed. "
+ JSON.stringify(messageObject.error)); | 787 console.error("Request with id = " + messageObject.id + " failed. "
+ JSON.stringify(messageObject.error)); |
| 786 | 788 |
| 787 var argumentsArray = []; | 789 var argumentsArray = []; |
| 788 argumentsArray[0] = messageObject.error ? messageObject.error.message: n
ull; | 790 argumentsArray[0] = messageObject.error ? messageObject.error.message: n
ull; |
| 789 | 791 |
| 790 if (this._hasErrorData[methodName]) | 792 if (this._hasErrorData[methodName]) |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 } | 867 } |
| 866 | 868 |
| 867 } | 869 } |
| 868 | 870 |
| 869 InspectorBackendClass.Options = { | 871 InspectorBackendClass.Options = { |
| 870 dumpInspectorTimeStats: false, | 872 dumpInspectorTimeStats: false, |
| 871 dumpInspectorProtocolMessages: false | 873 dumpInspectorProtocolMessages: false |
| 872 } | 874 } |
| 873 | 875 |
| 874 InspectorBackend = new InspectorBackendClass(); | 876 InspectorBackend = new InspectorBackendClass(); |
| OLD | NEW |