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

Unified Diff: third_party/WebKit/Source/devtools/front_end/product_registry/ProductRegistry.js

Issue 2884063003: DevTools: console is missing when debugging Node (Closed)
Patch Set: same Created 3 years, 7 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 | « third_party/WebKit/Source/devtools/front_end/inspector.json ('k') | 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/product_registry/ProductRegistry.js
diff --git a/third_party/WebKit/Source/devtools/front_end/product_registry/ProductRegistry.js b/third_party/WebKit/Source/devtools/front_end/product_registry/ProductRegistry.js
index a7b69ba906eda4fec5703d2e648abfbfc73fac6a..8b7d2f935c502033891ec002d561731d336208ef 100644
--- a/third_party/WebKit/Source/devtools/front_end/product_registry/ProductRegistry.js
+++ b/third_party/WebKit/Source/devtools/front_end/product_registry/ProductRegistry.js
@@ -5,7 +5,10 @@
* @return {!Promise<!ProductRegistry.Registry>}
*/
ProductRegistry.instance = function() {
- return self.runtime.extension(ProductRegistry.Registry).instance();
+ var extension = self.runtime.extension(ProductRegistry.Registry);
+ if (extension)
+ return extension.instance();
+ return Promise.resolve(self.singleton(ProductRegistry.RegistryStub));
};
/**
@@ -33,5 +36,37 @@ ProductRegistry.Registry.prototype = {
typeForUrl: function(parsedUrl) {}
};
+/**
+ * @implements {ProductRegistry.Registry}
+ */
+ProductRegistry.RegistryStub = class {
+ /**
+ * @override
+ * @param {!Common.ParsedURL} parsedUrl
+ * @return {?string}
+ */
+ nameForUrl(parsedUrl) {
+ return null;
+ }
+
+ /**
+ * @override
+ * @param {!Common.ParsedURL} parsedUrl
+ * @return {?ProductRegistry.Registry.ProductEntry}
+ */
+ entryForUrl(parsedUrl) {
+ return null;
+ }
+
+ /**
+ * @override
+ * @param {!Common.ParsedURL} parsedUrl
+ * @return {?number}
+ */
+ typeForUrl(parsedUrl) {
+ return null;
+ }
+};
+
/** @typedef {!{name: string, type: ?number}} */
ProductRegistry.Registry.ProductEntry;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/inspector.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698