[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 369/483: Worked around bug 719180, prevent update failures due to locked XPI file

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:41:57 UTC 2015


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

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

commit cf923046d326139b61f5bbe30cf20610d3c1e2f3
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Wed Jan 18 21:33:58 2012 +0100

    Worked around bug 719180, prevent update failures due to locked XPI file
---
 chrome/content/attribute.xml | 2 +-
 chrome/content/composer.js   | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/chrome/content/attribute.xml b/chrome/content/attribute.xml
index b001467..66e2ed9 100644
--- a/chrome/content/attribute.xml
+++ b/chrome/content/attribute.xml
@@ -27,7 +27,7 @@
     </handlers>
   </binding>
 
-  <binding id="attributeAdvanced" extends="chrome://elemhidehelper/content/attribute.xml#attributeBasic">
+  <binding id="attributeAdvanced" extends="#attributeBasic">
     <content>
       <xul:checkbox anonid="checkbox" xbl:inherits="checked"/>
       <xul:vbox flex="1">
diff --git a/chrome/content/composer.js b/chrome/content/composer.js
index 530624e..833d4c7 100644
--- a/chrome/content/composer.js
+++ b/chrome/content/composer.js
@@ -18,6 +18,7 @@ var stylesheetURL;
 var previewStyle = null;
 var doc;
 
+Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("chrome://elemhidehelper-modules/content/Prefs.jsm");
 
 let abpURL = Cc["@adblockplus.org/abp/public;1"].getService(Ci.nsIURI);
@@ -477,8 +478,12 @@ function fillAttributes(nodeData) {
   while(list.firstChild)
     list.removeChild(list.firstChild);
 
-  let xblBasic = "url(chrome://elemhidehelper/content/attribute.xml#attributeBasic)";
-  let xblAdvanced = "url(chrome://elemhidehelper/content/attribute.xml#attributeAdvanced)";
+  // Work-around for bug 719180 - don't access XBL binding via its chrome:// address
+  let chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"]
+                         .getService(Ci.nsIChromeRegistry);
+  let xblURL = chromeRegistry.convertChromeURL(Services.io.newURI("chrome://elemhidehelper/content/attribute.xml", null, null)).spec;
+  let xblBasic = "url(" + xblURL + "#attributeBasic)";
+  let xblAdvanced = "url(" + xblURL + "#attributeAdvanced)";
 
   // Add tag name entry
   var node = document.createElement("attribute");

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



More information about the Pkg-mozext-commits mailing list