[Pkg-mozext-commits] [adblock-plus] 213/464: Removed unrequire() function from module scope (this hack is no longer used)
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:18 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 59e97a95780f073b8527746f5c55550d549a775a
Author: Wladimir Palant <trev at adblockplus.org>
Date: Mon Jan 23 15:54:48 2012 +0100
Removed unrequire() function from module scope (this hack is no longer used)
---
bootstrap.js.tmpl | 14 ++++++--------
packager.py | 5 +----
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/bootstrap.js.tmpl b/bootstrap.js.tmpl
index 44e94fb..ccc6caa 100644
--- a/bootstrap.js.tmpl
+++ b/bootstrap.js.tmpl
@@ -112,7 +112,12 @@ function require(module)
else
{
{%- endif %}
- scopes[module] = {require: require, {% if hasUnrequires %}unrequire: unrequire, {% endif %}{% if hasShutdownHandlers %}onShutdown: onShutdown, {% endif %}exports: {}};
+ scopes[module] = {
+ require: require,
+ {% if hasShutdownHandlers %}
+ onShutdown: onShutdown,
+ {% endif %}
+ exports: {}};
Services.scriptloader.loadSubScript(addonData.resourceURI.spec + module + ".js", scopes[module]);
{%- if 'info' in requires %}
}
@@ -122,13 +127,6 @@ function require(module)
}
require.scopes = {__proto__: null};
-{%- if hasUnrequires %}
-function unrequire(module)
-{
- delete require.scopes[module];
-}
-{%- endif %}
-
{%- if hasChromeRequires %}
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
diff --git a/packager.py b/packager.py
index 9611f5e..0eacf01 100644
--- a/packager.py
+++ b/packager.py
@@ -221,7 +221,6 @@ def addMissingFiles(baseDir, params, files):
templateData = {
'hasChrome': False,
'hasChromeRequires': False,
- 'hasUnrequires': False,
'hasShutdownHandlers': False,
'chromeWindows': [],
'requires': {},
@@ -235,9 +234,7 @@ def addMissingFiles(baseDir, params, files):
if name.startswith('chrome/content/'):
templateData['hasChromeRequires'] = True
if not '/' in name:
- if re.search(r'(?:^|\s)unrequire\(', content):
- templateData['hasUnrequires'] = True
- elif re.search(r'(?:^|\s)onShutdown\.', content):
+ if re.search(r'(?:^|\s)onShutdown\.', content):
templateData['hasShutdownHandlers'] = True
for name, content in files.iteritems():
--
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