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

Unified 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: address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
diff --git a/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js b/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
index ab5ebefc94005178f36eb7e5c186e187dd3e7992..c9b517b534dac533c71ac83a3ac1a8e67162df92 100644
--- a/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
+++ b/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
@@ -64,10 +64,14 @@
*/
addExtensions(extensions) {
// Support for legacy front-ends (<M41).
- if (window['WebInspector'] && window['WebInspector']['addExtensions'])
+ if (window['WebInspector'] && window['WebInspector']['addExtensions']) {
window['WebInspector']['addExtensions'](extensions);
- else
+ } else if (window['InspectorFrontendAPI']) {
+ // The addExtensions command is sent as the onload event happens for
+ // DevTools front-end. In case of hosted mode, this
+ // happens before the InspectorFrontendAPI is initialized.
this._dispatchOnInspectorFrontendAPI('addExtensions', [extensions]);
+ }
}
/**
« 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