[Pkg-mozext-commits] [adblock-plus] 23/98: Issue 4243 - Fixed NS_ERROR_ILLEGAL_VALUE exception in utils.getFrames()

David Prévot taffit at moszumanska.debian.org
Tue Oct 24 01:30:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 28a7535bade449b98478a8eb30981cec47c716e3
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Thu Jul 14 15:44:45 2016 +0200

    Issue 4243 - Fixed NS_ERROR_ILLEGAL_VALUE exception in utils.getFrames()
---
 lib/child/elemHide.js | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/child/elemHide.js b/lib/child/elemHide.js
index e1d1fec..ddd0a4f 100644
--- a/lib/child/elemHide.js
+++ b/lib/child/elemHide.js
@@ -325,6 +325,17 @@ let observer = {
     if (topic != this.topic)
       return;
 
+    if (!subject.location || !subject.location.href)
+    {
+      // The window is in an invalid state - delay processing until it's ready.
+      Utils.runAsync(() =>
+      {
+        if (!Cu.isDeadWrapper(subject))
+          this.observe(subject, topic, data)
+      });
+      return;
+    }
+
     port.emitWithResponse("elemhideEnabled", {
       frames: getFrames(subject),
       isPrivate: isPrivate(subject)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list