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

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

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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
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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 * @param {function(*)|function(?Protocol.Error, ?Object)} callback 630 * @param {function(*)|function(?Protocol.Error, ?Object)} callback
631 */ 631 */
632 dispatchResponse: function(messageObject, methodName, callback) 632 dispatchResponse: function(messageObject, methodName, callback)
633 { 633 {
634 if (messageObject.error && messageObject.error.code !== InspectorBackend Class._DevToolsErrorCode && messageObject.error.code !== InspectorBackendClass.D evToolsStubErrorCode && !InspectorBackendClass.Options.suppressRequestErrors && !this._suppressErrorLogging) { 634 if (messageObject.error && messageObject.error.code !== InspectorBackend Class._DevToolsErrorCode && messageObject.error.code !== InspectorBackendClass.D evToolsStubErrorCode && !InspectorBackendClass.Options.suppressRequestErrors && !this._suppressErrorLogging) {
635 var id = InspectorBackendClass.Options.dumpInspectorProtocolMessages ? " with id = " + messageObject.id : ""; 635 var id = InspectorBackendClass.Options.dumpInspectorProtocolMessages ? " with id = " + messageObject.id : "";
636 console.error("Request " + methodName + id + " failed. " + JSON.stri ngify(messageObject.error)); 636 console.error("Request " + methodName + id + " failed. " + JSON.stri ngify(messageObject.error));
637 } 637 }
638 638
639 var argumentsArray = []; 639 var argumentsArray = [];
640 argumentsArray[0] = messageObject.error ? messageObject.error.message: n ull; 640 argumentsArray[0] = messageObject.error ? messageObject.error.message : null;
641 641
642 if (this._hasErrorData[methodName]) 642 if (this._hasErrorData[methodName])
643 argumentsArray[1] = messageObject.error ? messageObject.error.data : null; 643 argumentsArray[1] = messageObject.error ? messageObject.error.data : null;
644 644
645 if (messageObject.result) { 645 if (messageObject.result) {
646 var paramNames = this._replyArgs[methodName] || []; 646 var paramNames = this._replyArgs[methodName] || [];
647 for (var i = 0; i < paramNames.length; ++i) 647 for (var i = 0; i < paramNames.length; ++i)
648 argumentsArray.push(messageObject.result[paramNames[i]]); 648 argumentsArray.push(messageObject.result[paramNames[i]]);
649 } 649 }
650 650
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 722 }
723 } 723 }
724 724
725 InspectorBackendClass.Options = { 725 InspectorBackendClass.Options = {
726 dumpInspectorTimeStats: false, 726 dumpInspectorTimeStats: false,
727 dumpInspectorProtocolMessages: false, 727 dumpInspectorProtocolMessages: false,
728 suppressRequestErrors: false 728 suppressRequestErrors: false
729 } 729 }
730 730
731 InspectorBackend = new InspectorBackendClass(); 731 InspectorBackend = new InspectorBackendClass();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698