summaryrefslogtreecommitdiffstats
path: root/devtools/server/actors/webbrowser.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/actors/webbrowser.js')
-rw-r--r--devtools/server/actors/webbrowser.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/devtools/server/actors/webbrowser.js b/devtools/server/actors/webbrowser.js
index 0edcdc187..dffe49b91 100644
--- a/devtools/server/actors/webbrowser.js
+++ b/devtools/server/actors/webbrowser.js
@@ -30,7 +30,9 @@ loader.lazyRequireGetter(this, "WorkerActorList", "devtools/server/actors/worker
loader.lazyRequireGetter(this, "ServiceWorkerRegistrationActorList", "devtools/server/actors/worker", true);
loader.lazyRequireGetter(this, "ProcessActorList", "devtools/server/actors/process", true);
loader.lazyImporter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm");
+#ifdef MOZ_WEBEXTENSIONS
loader.lazyImporter(this, "ExtensionContent", "resource://gre/modules/ExtensionContent.jsm");
+#endif
// Assumptions on events module:
// events needs to be dispatched synchronously,
@@ -982,6 +984,7 @@ TabActor.prototype = {
return null;
},
+#ifdef MOZ_WEBEXTENSIONS
/**
* Getter for the WebExtensions ContentScript globals related to the
* current tab content's DOM window.
@@ -994,6 +997,7 @@ TabActor.prototype = {
return [];
},
+#endif
/**
* Getter for the list of all content DOM windows in this tabActor
@@ -2497,7 +2501,11 @@ DebuggerProgressListener.prototype = {
if (isWindow && isStop) {
// Don't dispatch "navigate" event just yet when there is a redirect to
// about:neterror page.
- if (request.status != Cr.NS_OK) {
+ // Navigating to about:neterror will make `status` be something else than NS_OK.
+ // But for some error like NS_BINDING_ABORTED we don't want to emit any `navigate`
+ // event as the page load has been cancelled and the related page document is going
+ // to be a dead wrapper.
+ if (request.status != Cr.NS_OK && request.status != Cr.NS_BINDING_ABORTED) {
// Instead, listen for DOMContentLoaded as about:neterror is loaded
// with LOAD_BACKGROUND flags and never dispatches load event.
// That may be the same reason why there is no onStateChange event