Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/protocol/InspectorBackend.js

Issue 2648633002: DevTools: enable backwards-compatibility testing (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/scripts/npm_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 _invoke(method, args, callback) { 627 _invoke(method, args, callback) {
628 this._target._wrapCallbackAndSendMessageObject(this._domain, method, args, c allback); 628 this._target._wrapCallbackAndSendMessageObject(this._domain, method, args, c allback);
629 } 629 }
630 630
631 /** 631 /**
632 * @param {!Object} messageObject 632 * @param {!Object} messageObject
633 * @param {string} methodName 633 * @param {string} methodName
634 * @param {function(*)|function(?Protocol.Error, ?Object)} callback 634 * @param {function(*)|function(?Protocol.Error, ?Object)} callback
635 */ 635 */
636 dispatchResponse(messageObject, methodName, callback) { 636 dispatchResponse(messageObject, methodName, callback) {
637 if (messageObject.error && messageObject.error.code !== Protocol.InspectorBa ckend._ConnectionClosedErrorCode &&
chenwilliam 2017/01/19 23:08:00 I removed this after discussing with @pfeldman bec
dgozman 2017/01/20 17:52:09 Let's land this separately: - I'm worried we will
chenwilliam 2017/01/20 20:19:21 OK, removing from CL. What kind of cleanup on erro
638 messageObject.error.code !== Protocol.InspectorBackend.DevToolsStubError Code &&
639 !Protocol.InspectorBackend.Options.suppressRequestErrors) {
640 var id = Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages ? ' with id = ' + messageObject.id : '';
641 console.error('Request ' + methodName + id + ' failed. ' + JSON.stringify( messageObject.error));
642 }
643
644 var argumentsArray = []; 637 var argumentsArray = [];
645 argumentsArray[0] = messageObject.error ? messageObject.error.message : null ; 638 argumentsArray[0] = messageObject.error ? messageObject.error.message : null ;
646 639
647 if (this._hasErrorData[methodName]) 640 if (this._hasErrorData[methodName])
648 argumentsArray[1] = messageObject.error ? messageObject.error.data : null; 641 argumentsArray[1] = messageObject.error ? messageObject.error.data : null;
649 642
650 if (messageObject.result) { 643 if (messageObject.result) {
651 var paramNames = this._replyArgs[methodName] || []; 644 var paramNames = this._replyArgs[methodName] || [];
652 for (var i = 0; i < paramNames.length; ++i) 645 for (var i = 0; i < paramNames.length; ++i)
653 argumentsArray.push(messageObject.result[paramNames[i]]); 646 argumentsArray.push(messageObject.result[paramNames[i]]);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 if (Protocol.InspectorBackend.Options.dumpInspectorTimeStats) 712 if (Protocol.InspectorBackend.Options.dumpInspectorTimeStats)
720 console.timeEnd(timingLabel); 713 console.timeEnd(timingLabel);
721 } 714 }
722 }; 715 };
723 716
724 Protocol.InspectorBackend.Options = { 717 Protocol.InspectorBackend.Options = {
725 dumpInspectorTimeStats: false, 718 dumpInspectorTimeStats: false,
726 dumpInspectorProtocolMessages: false, 719 dumpInspectorProtocolMessages: false,
727 suppressRequestErrors: false 720 suppressRequestErrors: false
728 }; 721 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/scripts/npm_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698