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

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

Issue 2744573002: DevTools: [hosted mode] avoid exception in devtools_compatibility:addExtensions (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /* eslint-disable indent */ 4 /* eslint-disable indent */
5 (function(window) { 5 (function(window) {
6 6
7 // DevToolsAPI --------------------------------------------------------------- - 7 // DevToolsAPI --------------------------------------------------------------- -
8 8
9 /** 9 /**
10 * @unrestricted 10 * @unrestricted
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 inspectorFrontendAPI[method].apply(inspectorFrontendAPI, args); 57 inspectorFrontendAPI[method].apply(inspectorFrontendAPI, args);
58 } 58 }
59 59
60 // API methods below this line -------------------------------------------- 60 // API methods below this line --------------------------------------------
61 61
62 /** 62 /**
63 * @param {!Array.<!ExtensionDescriptor>} extensions 63 * @param {!Array.<!ExtensionDescriptor>} extensions
64 */ 64 */
65 addExtensions(extensions) { 65 addExtensions(extensions) {
66 // Support for legacy front-ends (<M41). 66 // Support for legacy front-ends (<M41).
67 if (window['WebInspector'] && window['WebInspector']['addExtensions']) 67 if (window['WebInspector'] && window['WebInspector']['addExtensions']) {
68 window['WebInspector']['addExtensions'](extensions); 68 window['WebInspector']['addExtensions'](extensions);
69 else 69 } else if (window['InspectorFrontendAPI']) {
70 // The addExtensions command is sent as the onload event happens for
71 // DevTools front-end. In case of DEBUG_DEVTOOLS/hosted mode, this
dgozman 2017/03/09 23:35:17 That's only in hosted mode.
lushnikov 2017/03/10 02:27:58 Done.
72 // happens before the InspectorFrontendAPI is initialized.
70 this._dispatchOnInspectorFrontendAPI('addExtensions', [extensions]); 73 this._dispatchOnInspectorFrontendAPI('addExtensions', [extensions]);
74 }
71 } 75 }
72 76
73 /** 77 /**
74 * @param {string} url 78 * @param {string} url
75 */ 79 */
76 appendedToURL(url) { 80 appendedToURL(url) {
77 this._dispatchOnInspectorFrontendAPI('appendedToURL', [url]); 81 this._dispatchOnInspectorFrontendAPI('appendedToURL', [url]);
78 } 82 }
79 83
80 /** 84 /**
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 * @return {boolean} 1258 * @return {boolean}
1255 */ 1259 */
1256 DOMTokenList.prototype.toggle = function(token, force) { 1260 DOMTokenList.prototype.toggle = function(token, force) {
1257 if (arguments.length === 1) 1261 if (arguments.length === 1)
1258 force = !this.contains(token); 1262 force = !this.contains(token);
1259 return this.__originalDOMTokenListToggle(token, !!force); 1263 return this.__originalDOMTokenListToggle(token, !!force);
1260 }; 1264 };
1261 } 1265 }
1262 1266
1263 })(window); 1267 })(window);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698