[Pkg-javascript-commits] [pdf.js] 124/161: [Firefox] Stop importing default_preferences.js as a module and include it instead
David Prévot
taffit at moszumanska.debian.org
Sat Apr 19 14:16:37 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit f6cfab0061eb2b8e82d9611fba1d4427c3735bd4
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Fri Mar 21 23:16:03 2014 +0100
[Firefox] Stop importing default_preferences.js as a module and include it instead
---
extensions/firefox/bootstrap.js | 2 +-
extensions/firefox/content/PdfJs.jsm | 2 +-
make.js | 17 ++++++++++-------
web/default_preferences.js | 2 --
4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/extensions/firefox/bootstrap.js b/extensions/firefox/bootstrap.js
index 25bdaac..366fb7d 100644
--- a/extensions/firefox/bootstrap.js
+++ b/extensions/firefox/bootstrap.js
@@ -58,7 +58,7 @@ function log(str) {
}
function initializeDefaultPreferences() {
- Cu.import('resource://' + RESOURCE_NAME + '/default_preferences.js');
+//#include ../../web/default_preferences.js
var defaultBranch = Services.prefs.getDefaultBranch(EXT_PREFIX + '.');
var defaultValue;
diff --git a/extensions/firefox/content/PdfJs.jsm b/extensions/firefox/content/PdfJs.jsm
index 96ec430..6a8724c 100644
--- a/extensions/firefox/content/PdfJs.jsm
+++ b/extensions/firefox/content/PdfJs.jsm
@@ -62,7 +62,7 @@ function getIntPref(aPref, aDefaultValue) {
}
function initializeDefaultPreferences() {
- Cu.import('resource://pdf.js/default_preferences.js');
+//#include ../../../web/default_preferences.js
var defaultBranch = Services.prefs.getDefaultBranch(PREF_PREFIX + '.');
var defaultValue;
diff --git a/make.js b/make.js
index 418947e..a4c4ae9 100644
--- a/make.js
+++ b/make.js
@@ -612,13 +612,13 @@ target.firefox = function() {
[COMMON_WEB_FILES, FIREFOX_BUILD_CONTENT_DIR + '/web'],
['external/bcmaps/*', FIREFOX_BUILD_CONTENT_DIR + '/web/cmaps'],
[FIREFOX_EXTENSION_DIR + 'tools/l10n.js',
- FIREFOX_BUILD_CONTENT_DIR + '/web'],
- ['web/default_preferences.js', FIREFOX_BUILD_CONTENT_DIR]
+ FIREFOX_BUILD_CONTENT_DIR + '/web']
],
preprocess: [
[COMMON_WEB_FILES_PREPROCESS, FIREFOX_BUILD_CONTENT_DIR + '/web'],
[BUILD_TARGETS, FIREFOX_BUILD_CONTENT_DIR + BUILD_DIR],
- [SRC_DIR + 'core/network.js', FIREFOX_BUILD_CONTENT_DIR]
+ [SRC_DIR + 'core/network.js', FIREFOX_BUILD_CONTENT_DIR],
+ [FIREFOX_EXTENSION_DIR + 'bootstrap.js', FIREFOX_BUILD_DIR]
],
preprocessCSS: [
['firefox', 'web/viewer.css',
@@ -628,6 +628,7 @@ target.firefox = function() {
builder.build(setup);
cleanupJSSource(FIREFOX_BUILD_CONTENT_DIR + '/web/viewer.js');
+ cleanupJSSource(FIREFOX_BUILD_DIR + 'bootstrap.js');
// Remove '.DS_Store' and other hidden files
find(FIREFOX_BUILD_DIR).forEach(function(file) {
@@ -712,7 +713,8 @@ target.mozcentral = function() {
mkdir('-p', MOZCENTRAL_CONTENT_DIR + '/web');
mkdir('-p', MOZCENTRAL_CONTENT_DIR + '/web/cmaps');
- cp(FIREFOX_CONTENT_DIR + 'PdfJs.jsm', MOZCENTRAL_CONTENT_DIR);
+ // Do not copy PdfJs.jsm, since it should be run through the preprocessor.
+
cp(FIREFOX_CONTENT_DIR + 'PdfJsTelemetry.jsm', MOZCENTRAL_CONTENT_DIR);
cp(FIREFOX_CONTENT_DIR + 'PdfStreamConverter.jsm', MOZCENTRAL_CONTENT_DIR);
cp(FIREFOX_CONTENT_DIR + 'PdfRedirector.jsm', MOZCENTRAL_CONTENT_DIR);
@@ -730,13 +732,13 @@ target.mozcentral = function() {
copy: [
[COMMON_WEB_FILES, MOZCENTRAL_CONTENT_DIR + '/web'],
['external/bcmaps/*', MOZCENTRAL_CONTENT_DIR + '/web/cmaps'],
- ['extensions/firefox/tools/l10n.js', MOZCENTRAL_CONTENT_DIR + '/web'],
- ['web/default_preferences.js', MOZCENTRAL_CONTENT_DIR]
+ ['extensions/firefox/tools/l10n.js', MOZCENTRAL_CONTENT_DIR + '/web']
],
preprocess: [
[COMMON_WEB_FILES_PREPROCESS, MOZCENTRAL_CONTENT_DIR + '/web'],
[BUILD_TARGETS, MOZCENTRAL_CONTENT_DIR + BUILD_DIR],
- [SRC_DIR + 'core/network.js', MOZCENTRAL_CONTENT_DIR]
+ [SRC_DIR + 'core/network.js', MOZCENTRAL_CONTENT_DIR],
+ [FIREFOX_CONTENT_DIR + 'PdfJs.jsm', MOZCENTRAL_CONTENT_DIR]
],
preprocessCSS: [
['mozcentral',
@@ -747,6 +749,7 @@ target.mozcentral = function() {
builder.build(setup);
cleanupJSSource(MOZCENTRAL_CONTENT_DIR + '/web/viewer.js');
+ cleanupJSSource(MOZCENTRAL_CONTENT_DIR + '/PdfJs.jsm');
// Remove '.DS_Store' and other hidden files
find(MOZCENTRAL_DIR).forEach(function(file) {
diff --git a/web/default_preferences.js b/web/default_preferences.js
index 4989077..e6417e5 100644
--- a/web/default_preferences.js
+++ b/web/default_preferences.js
@@ -18,8 +18,6 @@
'use strict';
-var EXPORTED_SYMBOLS = ['DEFAULT_PREFERENCES'];
-
var DEFAULT_PREFERENCES = {
showPreviousViewOnLoad: true,
defaultZoomValue: '',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list