Created
February 16, 2012 20:51
-
-
Save legumbre/1847750 to your computer and use it in GitHub Desktop.
conkeror in_module mechanism removal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 37da0aed0b33973893ac909fc707d84ce7c3f170 | |
Author: John Foerch <[email protected]> | |
Date: Sun Jan 29 21:27:19 2012 -0500 | |
remove in_module mechanism | |
The procedure in_module was a central concept to the "new module system" | |
of 2010-03-19 that was to have made modules possible within the framework | |
of Conkeror's 'load' and 'require' mechanism. However, there was a fatal | |
flaw in the design, and it really doesn't work after all. The flaw was | |
that it didn't take account of hoisting, the property of javascript | |
whereby evaluation happens in two stages: first variables and functions | |
are defined, "hoisted" to the top of the scope, and then the code is | |
executed. The in_module mechanism depended upon exceptions to stop the | |
load of a javascript file if it was being loaded into the wrong scope, but | |
because of hoisting, the crucial exception can only take place after all | |
of the variables and functions have been defined, thus the in_module idea | |
is not really a workable idea in javascript. | |
This patch removes the in_module mechanism. A patch to follow will | |
introduce a new module system. This patch leaves the module | |
casual-spelling broken, to be resolved by the next patch with the | |
replacement module system. | |
A related, but little-used feature, skip_module_load, was broken for the | |
same reason, and also removed. | |
Modified components/application.js | |
diff --git a/components/application.js b/components/application.js | |
index 241b280..7e88914 100644 | |
--- a/components/application.js | |
+++ b/components/application.js | |
@@ -20,7 +20,6 @@ function application () { | |
this.load_url = this.subscript_loader.loadSubScript; | |
this.loading_urls = []; | |
this.loading_paths = []; | |
- this.loading_modules = []; | |
this.loading_features = []; | |
this.features = {}; | |
this.load_paths = [this.module_uri_prefix, | |
@@ -29,8 +28,6 @@ function application () { | |
this.after_load_functions = {}; | |
this.pending_loads = []; | |
- this.module_assert_conflict_error.prototype = Error.prototype; | |
- | |
// clear the startup-cache so that modules and the user's rc are | |
// loaded from disk, not from a cache. this problem is a | |
// characteristic of using mozIJSSubScriptLoader.loadSubScript as our | |
@@ -40,7 +37,7 @@ function application () { | |
obs.notifyObservers(null, "startupcache-invalidate", null); | |
try { | |
- this.require("conkeror.js", null); | |
+ this.require("conkeror.js"); | |
} catch (e) { | |
this.dumpln("Error initializing."); | |
this.dump_error(e); | |
@@ -90,27 +87,17 @@ application.prototype = { | |
return io_service.newFileURI(uri); | |
return io_service.newURI(uri, charset, base_uri); | |
}, | |
- skip_module_load: {}, | |
- load: function (module, as) { | |
- var conkeror = this; | |
- function module_scope () { | |
- this.__proto__ = conkeror; | |
- this.conkeror = conkeror; | |
- } | |
- function load1 (url, scope, path, as) { | |
- var success; | |
+ load: function (module) { | |
+ function load1 (url, path) { | |
try { | |
this.loading_paths.unshift(path); | |
this.loading_urls.unshift(url); | |
- this.loading_modules.unshift(as); | |
this.loading_features.unshift({}); | |
if (this.loading_urls.indexOf(url, 1) != -1) | |
throw new Error("Circular module dependency detected: "+ | |
this.loading_urls.join(",\n")); | |
- this.load_url(url, scope); | |
- success = true; | |
- if (as) | |
- this[as] = scope; | |
+ this.load_url(url, this); | |
+ var success = true; | |
// call-after-load callbacks | |
for (let f in this.loading_features[0]) { | |
this.features[f] = true; | |
@@ -119,7 +106,6 @@ application.prototype = { | |
} finally { | |
this.loading_paths.shift(); | |
this.loading_urls.shift(); | |
- this.loading_modules.shift(); | |
this.loading_features.shift(); | |
} | |
// do pending loads | |
@@ -127,42 +113,17 @@ application.prototype = { | |
let pending = this.pending_loads; | |
this.pending_loads = []; | |
for (let i = 0, m; m = pending[i]; ++i) { | |
- this.require(m[0], m[1]); | |
+ this.require(m); | |
} | |
} | |
} | |
- var scope = as; | |
- if (as == null) | |
- scope = this; | |
- else if (typeof as == 'string') | |
- scope = new module_scope(); | |
- else | |
- as = null; | |
- var path, url; | |
if (module instanceof Ci.nsIURI) | |
- path = module.spec.substr(0, module.spec.lastIndexOf('/')+1); | |
+ var path = module.spec.substr(0, module.spec.lastIndexOf('/')+1); | |
else if (module instanceof Ci.nsIFile) | |
path = module.parent.path; | |
- var restarted = false; | |
if (path !== undefined) { | |
- url = this.make_uri(module).spec; | |
- do { | |
- try { | |
- load1.call(this, url, scope, path, as); | |
- return; | |
- } catch (e if e instanceof this.module_assert_error) { | |
- if (restarted) | |
- throw new this.module_assert_conflict_error(url); | |
- as = e.module; | |
- if (e.module) | |
- scope = new module_scope(); | |
- else | |
- scope = this; | |
- restarted = true; | |
- } catch (e if e == this.skip_module_load) { | |
- return; | |
- } | |
- } while (restarted); | |
+ var url = this.make_uri(module).spec; | |
+ load1.call(this, url, path); | |
} else { | |
// module name or relative path | |
var autoext = module.substr(-3) != '.js'; | |
@@ -180,29 +141,17 @@ application.prototype = { | |
let si = module.lastIndexOf('/'); | |
if (si > -1) | |
truepath += module.substr(0, si); | |
- if (! tried[url] || tried[url] !== scope) { | |
- tried[url] = scope; | |
- load1.call(this, url, scope, truepath, as); | |
+ if (! tried[url]) { | |
+ tried[url] = true; | |
+ load1.call(this, url, truepath); | |
return; | |
} | |
- } catch (e if e instanceof this.module_assert_error) { | |
- if (restarted) | |
- throw new this.module_assert_conflict_error(url); | |
- as = e.module; | |
- if (e.module) | |
- scope = new module_scope(); | |
- else | |
- scope = this; | |
- restarted = true; | |
- continue; | |
} catch (e if (typeof e == 'string' && | |
{"ContentLength not available (not a local URL?)":true, | |
"Error creating channel (invalid URL scheme?)":true, | |
"Error opening input stream (invalid filename?)":true} | |
[e])) { | |
// null op. (suppress error, try next path) | |
- } catch (e if e == this.skip_module_load) { | |
- return; | |
} | |
if (autoext) | |
suffix = !suffix; | |
@@ -212,19 +161,6 @@ application.prototype = { | |
throw new Error("Module not found ("+module+")"); | |
} | |
}, | |
- module_assert_error: function (module) { | |
- this.module = module; | |
- }, | |
- module_assert_conflict_error: function (url) { //subclass of Error | |
- this.name = "module_assert_conflict_error"; | |
- this.message = "Conflicting in_module calls"; | |
- this.fileName = url; | |
- this.lineNumber = ''; | |
- }, | |
- in_module: function (module) { | |
- if (module != this.loading_modules[0]) | |
- throw new this.module_assert_error(module); | |
- }, | |
provide: function (symbol) { | |
if (! symbol) | |
throw new Error("Cannot provide null feature"); | |
@@ -260,37 +196,32 @@ application.prototype = { | |
} | |
} | |
}, | |
- require: function (module, as) { | |
- var feature = as; | |
- if (! feature) { | |
- if (module instanceof Ci.nsIURI) | |
- feature = module.spec.substr(module.spec.lastIndexOf('/')+1); | |
- else if (module instanceof Ci.nsIFile) | |
- feature = module.leafName; | |
- else | |
- feature = module.substr(module.lastIndexOf('/')+1); | |
- let dot = feature.indexOf('.'); | |
- if (dot == 0) | |
- return false; | |
- if (dot > 0) | |
- feature = feature.substr(0, dot); | |
- feature = feature.replace('_', '-', 'g'); | |
- } | |
+ require: function (module) { | |
+ if (module instanceof Ci.nsIURI) | |
+ var feature = module.spec.substr(module.spec.lastIndexOf('/')+1); | |
+ else if (module instanceof Ci.nsIFile) | |
+ feature = module.leafName; | |
+ else | |
+ feature = module.substr(module.lastIndexOf('/')+1); | |
+ var dot = feature.indexOf('.'); | |
+ if (dot == 0) | |
+ return false; | |
+ if (dot > 0) | |
+ feature = feature.substr(0, dot); | |
+ feature = feature.replace('_', '-', 'g'); | |
if (this.featurep(feature)) | |
return true; | |
- if (as === undefined) | |
- as = feature.replace('-', '_', 'g'); | |
try { | |
// ensure current path is not searched for 'require' | |
this.loading_paths.unshift(undefined); | |
- this.load(module, as); | |
+ this.load(module); | |
} finally { | |
this.loading_paths.shift(); | |
} | |
return true; | |
}, | |
- require_later: function (module, as) { | |
- this.pending_loads.push([module, as]); | |
+ require_later: function (module) { | |
+ this.pending_loads.push(module); | |
}, | |
/* nsISupports */ | |
Modified contrib/modules/mode-line-buttons.js | |
diff --git a/contrib/modules/mode-line-buttons.js b/contrib/modules/mode-line-buttons.js | |
index 0b85614..cfbf6e2 100644 | |
--- a/contrib/modules/mode-line-buttons.js | |
+++ b/contrib/modules/mode-line-buttons.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("mode-line.js"); | |
function button_widget (window) { | |
Modified modules/array.js | |
diff --git a/modules/array.js b/modules/array.js | |
index c73045a..5e8e2b1 100644 | |
--- a/modules/array.js | |
+++ b/modules/array.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/** | |
* array_p returns true if its argument is an array, otherwise false. | |
*/ | |
Modified modules/bindings/default/bindings.js | |
diff --git a/modules/bindings/default/bindings.js b/modules/bindings/default/bindings.js | |
index 3413d86..93ce7b3 100644 | |
--- a/modules/bindings/default/bindings.js | |
+++ b/modules/bindings/default/bindings.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/* | |
* define keymaps | |
*/ | |
Modified modules/block-content-focus-change.js | |
diff --git a/modules/block-content-focus-change.js b/modules/block-content-focus-change.js | |
index 7efb341..ce20fb1 100644 | |
--- a/modules/block-content-focus-change.js | |
+++ b/modules/block-content-focus-change.js | |
@@ -11,8 +11,6 @@ | |
* rude websites from changing the element focus via javascript. | |
*/ | |
-in_module(null); | |
- | |
define_variable("block_content_focus_change_duration", 20, | |
"Duration (in milliseconds) during which an element is "+ | |
"allowed to gain focus following a mouse click or key press, "+ | |
Modified modules/buffer.js | |
diff --git a/modules/buffer.js b/modules/buffer.js | |
index 1a22570..68cee56 100644 | |
--- a/modules/buffer.js | |
+++ b/modules/buffer.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
var define_buffer_local_hook = local_hook_definer("window"); | |
function define_current_buffer_hook (hook_name, existing_hook) { | |
Modified modules/builtin-commands.js | |
diff --git a/modules/builtin-commands.js b/modules/builtin-commands.js | |
index b75bb01..505db53 100644 | |
--- a/modules/builtin-commands.js | |
+++ b/modules/builtin-commands.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("interactive.js"); | |
interactive("set-mark", | |
Modified modules/cache.js | |
diff --git a/modules/cache.js b/modules/cache.js | |
index 2034667..816760c 100644 | |
--- a/modules/cache.js | |
+++ b/modules/cache.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
const cache_service = Cc["@mozilla.org/network/cache-service;1"] | |
.getService(Ci.nsICacheService); | |
Modified modules/caret.js | |
diff --git a/modules/caret.js b/modules/caret.js | |
index eed2c92..601d9c3 100644 | |
--- a/modules/caret.js | |
+++ b/modules/caret.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function caret_modality (buffer, elem) { | |
buffer.keymaps.push(caret_keymap); | |
} | |
Modified modules/clicks-in-new-buffer.js | |
diff --git a/modules/clicks-in-new-buffer.js b/modules/clicks-in-new-buffer.js | |
index accff84..40b5f99 100644 | |
--- a/modules/clicks-in-new-buffer.js | |
+++ b/modules/clicks-in-new-buffer.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_variable("clicks_in_new_buffer_button", 1, | |
"Which mouse button should open links in a new buffer. " + | |
"0 = left, 1 = middle, 2 = right. Default is 1."); | |
Modified modules/command-line.js | |
diff --git a/modules/command-line.js b/modules/command-line.js | |
index 10e4a5d..01fb188 100644 | |
--- a/modules/command-line.js | |
+++ b/modules/command-line.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
var command_line_handlers = []; | |
define_variable("conkeror_started", false, | |
Modified modules/commands.js | |
diff --git a/modules/commands.js b/modules/commands.js | |
index 7bd0b58..023f87b 100644 | |
--- a/modules/commands.js | |
+++ b/modules/commands.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_coroutine_hook("before_quit_hook", RUN_HOOK_UNTIL_FAILURE); | |
define_hook("quit_hook"); | |
Modified modules/conkeror.js | |
diff --git a/modules/conkeror.js b/modules/conkeror.js | |
index 6595fd1..6cb99ec 100644 | |
--- a/modules/conkeror.js | |
+++ b/modules/conkeror.js | |
@@ -6,87 +6,85 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
var start_time = Date.now(); | |
-require("keywords.js", null); | |
-require("labels.js", null); | |
-require("coroutine.js", null); | |
-require("debug.js", null); | |
-require("hook.js", null); | |
-require("timer.js", null); | |
-require("pretty-print.js", null); | |
-require("services.js", null); | |
- | |
-require("string.js", null); | |
-require("pref.js", null); | |
-require("env.js", null); | |
-require("source-code.js", null); | |
-require("user-variable.js", null); | |
-require("stylesheet.js", null); | |
-require("array.js", null); | |
-require("builtin-commands.js", null); | |
-require("text.js", null); | |
-require("login.js", null); | |
- | |
-require("user-agent.js", null); | |
-require("utils.js", null); | |
-require("interactive.js", null); | |
-require("minibuffer.js", null); | |
-require("minibuffer-read.js", null); | |
-require("minibuffer-read-option.js", null); | |
-require("minibuffer-completion.js", null); | |
-require("minibuffer-read-file.js", null); | |
-require("spawn-process.js", null); | |
-require("mime.js", null); | |
-require("keymap.js", null); | |
-require("input.js", null); | |
-require("buffer.js", null); | |
-require("window.js", null); | |
-require("content-handler.js", null); | |
-require("download-manager.js", null); | |
- | |
-require("element.js", null); | |
- | |
-require("content-buffer.js", null); | |
-require("content-buffer-input.js", null); | |
-require("quote.js", null); | |
-require("caret.js", null); | |
- | |
-require("universal-argument.js", null); | |
-require("commands.js", null); | |
-require("webjump.js", null); | |
-require("history.js", null); | |
-require("scroll.js", null); | |
- | |
-require("save.js", null); | |
- | |
-require("zoom.js", null); | |
-require("follow-relationship.js", null); | |
- | |
-require("isearch.js", null); | |
- | |
-require("hints.js", null); | |
- | |
-require("help.js", null); | |
- | |
-require("rc.js", null); | |
- | |
-require("ssl.js", null); | |
- | |
-require("media.js", null); | |
- | |
-require("command-line.js", null); | |
- | |
-require("opensearch.js", null); | |
- | |
-require("permission-manager.js", null); | |
-require("cookie.js", null); | |
-require("cache.js", null); | |
- | |
-require("theme.js", null); | |
-require("formfill.js", null); | |
+require("keywords.js"); | |
+require("labels.js"); | |
+require("coroutine.js"); | |
+require("debug.js"); | |
+require("hook.js"); | |
+require("timer.js"); | |
+require("pretty-print.js"); | |
+require("services.js"); | |
+ | |
+require("string.js"); | |
+require("pref.js"); | |
+require("env.js"); | |
+require("source-code.js"); | |
+require("user-variable.js"); | |
+require("stylesheet.js"); | |
+require("array.js"); | |
+require("builtin-commands.js"); | |
+require("text.js"); | |
+require("login.js"); | |
+ | |
+require("user-agent.js"); | |
+require("utils.js"); | |
+require("interactive.js"); | |
+require("minibuffer.js"); | |
+require("minibuffer-read.js"); | |
+require("minibuffer-read-option.js"); | |
+require("minibuffer-completion.js"); | |
+require("minibuffer-read-file.js"); | |
+require("spawn-process.js"); | |
+require("mime.js"); | |
+require("keymap.js"); | |
+require("input.js"); | |
+require("buffer.js"); | |
+require("window.js"); | |
+require("content-handler.js"); | |
+require("download-manager.js"); | |
+ | |
+require("element.js"); | |
+ | |
+require("content-buffer.js"); | |
+require("content-buffer-input.js"); | |
+require("quote.js"); | |
+require("caret.js"); | |
+ | |
+require("universal-argument.js"); | |
+require("commands.js"); | |
+require("webjump.js"); | |
+require("history.js"); | |
+require("scroll.js"); | |
+ | |
+require("save.js"); | |
+ | |
+require("zoom.js"); | |
+require("follow-relationship.js"); | |
+ | |
+require("isearch.js"); | |
+ | |
+require("hints.js"); | |
+ | |
+require("help.js"); | |
+ | |
+require("rc.js"); | |
+ | |
+require("ssl.js"); | |
+ | |
+require("media.js"); | |
+ | |
+require("command-line.js"); | |
+ | |
+require("opensearch.js"); | |
+ | |
+require("permission-manager.js"); | |
+require("cookie.js"); | |
+require("cache.js"); | |
+ | |
+require("theme.js"); | |
+require("formfill.js"); | |
define_variable("cwd", get_home_directory(), | |
Modified modules/content-buffer-input.js | |
diff --git a/modules/content-buffer-input.js b/modules/content-buffer-input.js | |
index e010a07..c785fd1 100644 | |
--- a/modules/content-buffer-input.js | |
+++ b/modules/content-buffer-input.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
Modified modules/content-buffer.js | |
diff --git a/modules/content-buffer.js b/modules/content-buffer.js | |
index 0399746..86f9fa9 100644 | |
--- a/modules/content-buffer.js | |
+++ b/modules/content-buffer.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("buffer.js"); | |
require("load-spec.js"); | |
require("history.js"); | |
Modified modules/content-handler.js | |
diff --git a/modules/content-handler.js b/modules/content-handler.js | |
index 64b1ed4..e59b55d 100644 | |
--- a/modules/content-handler.js | |
+++ b/modules/content-handler.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("mime-type-override.js"); | |
define_mime_type_table("content_handlers", {}, | |
Modified modules/content-policy.js | |
diff --git a/modules/content-policy.js b/modules/content-policy.js | |
index b467630..cb55a90 100644 | |
--- a/modules/content-policy.js | |
+++ b/modules/content-policy.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function content_policy_init () { | |
var xulrunner_version = Cc['@mozilla.org/xre/app-info;1'] | |
.getService(Ci.nsIXULAppInfo) | |
Modified modules/cookie.js | |
diff --git a/modules/cookie.js b/modules/cookie.js | |
index b93a9b3..f2f13d3 100644 | |
--- a/modules/cookie.js | |
+++ b/modules/cookie.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
var cookie_manager = Cc["@mozilla.org/cookiemanager;1"] | |
.getService(Ci.nsICookieManager2); | |
Modified modules/coroutine.js | |
diff --git a/modules/coroutine.js b/modules/coroutine.js | |
index 77b83de..d0c5339 100644 | |
--- a/modules/coroutine.js | |
+++ b/modules/coroutine.js | |
@@ -214,8 +214,6 @@ | |
* time, or completes. | |
**/ | |
-in_module(null); | |
- | |
function _return_value (x) { | |
this.value = x; | |
} | |
Modified modules/daemon.js | |
diff --git a/modules/daemon.js b/modules/daemon.js | |
index 522a8c8..f628a6d 100644 | |
--- a/modules/daemon.js | |
+++ b/modules/daemon.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("mode.js"); | |
define_variable("daemon_quit_exits", true, | |
Modified modules/debug.js | |
diff --git a/modules/debug.js b/modules/debug.js | |
index ee255ef..7f989b8 100644 | |
--- a/modules/debug.js | |
+++ b/modules/debug.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
var MAX_DUMP_DEPTH = 1; | |
function dump_obj_r (obj, name, indent, depth) { | |
if (depth > MAX_DUMP_DEPTH) { | |
Modified modules/download-manager.js | |
diff --git a/modules/download-manager.js b/modules/download-manager.js | |
index 4af35d8..1ff50d5 100644 | |
--- a/modules/download-manager.js | |
+++ b/modules/download-manager.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("special-buffer.js"); | |
require("mime-type-override.js"); | |
require("minibuffer-read-mime-type.js"); | |
Modified modules/element.js | |
diff --git a/modules/element.js b/modules/element.js | |
index f018261..28d40ed 100644 | |
--- a/modules/element.js | |
+++ b/modules/element.js | |
@@ -9,8 +9,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("hints.js"); | |
require("save.js"); | |
require("mime-type-override.js"); | |
Modified modules/env.js | |
diff --git a/modules/env.js b/modules/env.js | |
index ad3af9b..073ca7c 100644 | |
--- a/modules/env.js | |
+++ b/modules/env.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/** | |
* get_os returns a string identifying the current OS. | |
* possible values include 'Darwin', 'Linux' and 'WINNT'. | |
Modified modules/extensions/adblockplus.js | |
diff --git a/modules/extensions/adblockplus.js b/modules/extensions/adblockplus.js | |
index 9ca7d05..aa10fd9 100644 | |
--- a/modules/extensions/adblockplus.js | |
+++ b/modules/extensions/adblockplus.js | |
@@ -5,9 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
- | |
function adblockplus_settings (uri_string) { | |
if (! ("@adblockplus.org/abp/startup;1" in Cc)) | |
throw interactive_error("Adblock Plus not found"); | |
Modified modules/extensions/dom-inspector.js | |
diff --git a/modules/extensions/dom-inspector.js b/modules/extensions/dom-inspector.js | |
index e93752c..43e3939 100644 | |
--- a/modules/extensions/dom-inspector.js | |
+++ b/modules/extensions/dom-inspector.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function open_dom_inspector () { | |
make_chrome_window("chrome://inspector/content/"); | |
} | |
Modified modules/extensions/noscript.js | |
diff --git a/modules/extensions/noscript.js b/modules/extensions/noscript.js | |
index d6814ac..57e35ac 100644 | |
--- a/modules/extensions/noscript.js | |
+++ b/modules/extensions/noscript.js | |
@@ -1,6 +1,4 @@ | |
-in_module(null); | |
- | |
var noscript_service = Cc["@maone.net/noscript-service;1"] | |
.createInstance().wrappedJSObject; | |
Modified modules/extensions/venkman.js | |
diff --git a/modules/extensions/venkman.js b/modules/extensions/venkman.js | |
index 1a11a6b..7aad175 100644 | |
--- a/modules/extensions/venkman.js | |
+++ b/modules/extensions/venkman.js | |
@@ -9,8 +9,6 @@ | |
* glue code between venkman and conkeror | |
*/ | |
-in_module(null); | |
- | |
function open_venkman () { | |
make_chrome_window("chrome://venkman/content/venkman.xul"); | |
} | |
Modified modules/external-editor.js | |
diff --git a/modules/external-editor.js b/modules/external-editor.js | |
index 9343c8b..eceb7dd 100644 | |
--- a/modules/external-editor.js | |
+++ b/modules/external-editor.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_variable("editor_shell_command", getenv("VISUAL") || getenv("EDITOR") || "emacs", | |
"Shell command used to invoke an external editor.\n" + | |
"This defaults to the value of the EDITOR environment variable. If " + | |
Modified modules/eye-guide.js | |
diff --git a/modules/eye-guide.js b/modules/eye-guide.js | |
index 5fbf50b..255c448 100644 | |
--- a/modules/eye-guide.js | |
+++ b/modules/eye-guide.js | |
@@ -14,8 +14,6 @@ | |
* | |
*/ | |
-in_module(null); | |
- | |
define_variable("eye_guide_interval", 800, | |
"Interval during which the eye guide is visible (in ms). "+ | |
"When 0, the eye guide will remain visible."); | |
Modified modules/favicon.js | |
diff --git a/modules/favicon.js b/modules/favicon.js | |
index a18cc1e..83b281b 100644 | |
--- a/modules/favicon.js | |
+++ b/modules/favicon.js | |
@@ -9,8 +9,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
const favicon_service = Cc["@mozilla.org/browser/favicon-service;1"] | |
.getService(Ci.nsIFaviconService); | |
Modified modules/follow-relationship.js | |
diff --git a/modules/follow-relationship.js b/modules/follow-relationship.js | |
index 6e92701..65e95e0 100644 | |
--- a/modules/follow-relationship.js | |
+++ b/modules/follow-relationship.js | |
@@ -9,8 +9,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("element.js"); | |
const RELATIONSHIP_NEXT = 0; | |
Modified modules/formfill.js | |
diff --git a/modules/formfill.js b/modules/formfill.js | |
index 3e69831..5607357 100644 | |
--- a/modules/formfill.js | |
+++ b/modules/formfill.js | |
@@ -14,8 +14,6 @@ notes for future development: | |
http://mxr.mozilla.org/mozilla-central/source/xpfe/components/autocomplete/resources/content/autocomplete.xml | |
*/ | |
-in_module(null); | |
- | |
interactive("formfill-next", | |
"Select next item in the formfill popup.", | |
function (I) { | |
Modified modules/global-overlay-keymap.js | |
diff --git a/modules/global-overlay-keymap.js b/modules/global-overlay-keymap.js | |
index 303941b..bca9104 100644 | |
--- a/modules/global-overlay-keymap.js | |
+++ b/modules/global-overlay-keymap.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("input.js"); | |
define_keymap("global_overlay_keymap"); | |
Modified modules/help.js | |
diff --git a/modules/help.js b/modules/help.js | |
index 2327000..a640872 100644 | |
--- a/modules/help.js | |
+++ b/modules/help.js | |
@@ -8,8 +8,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("special-buffer.js"); | |
require("interactive.js"); | |
Modified modules/hints.js | |
diff --git a/modules/hints.js b/modules/hints.js | |
index c985b70..e8b30ed 100644 | |
--- a/modules/hints.js | |
+++ b/modules/hints.js | |
@@ -9,8 +9,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_variable("active_img_hint_background_color", "#88FF00", | |
"Color for the active image hint background."); | |
Modified modules/history.js | |
diff --git a/modules/history.js b/modules/history.js | |
index 84ae26a..ab96d8b 100644 | |
--- a/modules/history.js | |
+++ b/modules/history.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_keywords("$use_webjumps", "$use_history", "$use_bookmarks", | |
"$match_required", "$sort_order"); | |
function history_completer () { | |
Modified modules/hook.js | |
diff --git a/modules/hook.js b/modules/hook.js | |
index 4928bda..657e4d4 100644 | |
--- a/modules/hook.js | |
+++ b/modules/hook.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("coroutine.js"); | |
/* Adds the specified function to the specified hook. To add a local | |
Modified modules/index-webjump.js | |
diff --git a/modules/index-webjump.js b/modules/index-webjump.js | |
index 83485ad..f872491 100644 | |
--- a/modules/index-webjump.js | |
+++ b/modules/index-webjump.js | |
@@ -10,8 +10,6 @@ | |
* pages. | |
**/ | |
-in_module(null); | |
- | |
require("webjump.js"); | |
/* Objects with completion data for index webjumps. */ | |
Modified modules/input.js | |
diff --git a/modules/input.js b/modules/input.js | |
index de22e96..e48d33c 100644 | |
--- a/modules/input.js | |
+++ b/modules/input.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("window.js"); | |
require("keymap.js"); | |
require("interactive.js"); | |
Modified modules/interactive.js | |
diff --git a/modules/interactive.js b/modules/interactive.js | |
index ee891ac..0d5afb2 100644 | |
--- a/modules/interactive.js | |
+++ b/modules/interactive.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("utils.js"); | |
var interactive_commands = new string_hashmap(); | |
Modified modules/io.js | |
diff --git a/modules/io.js b/modules/io.js | |
index b2fbcd2..a8f20c6 100644 | |
--- a/modules/io.js | |
+++ b/modules/io.js | |
@@ -9,8 +9,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
const PERM_IWOTH = 00002; /* write permission, others */ | |
const PERM_IWGRP = 00020; /* write permission, group */ | |
Modified modules/isearch.js | |
diff --git a/modules/isearch.js b/modules/isearch.js | |
index d50a0bb..e33cf3f 100644 | |
--- a/modules/isearch.js | |
+++ b/modules/isearch.js | |
@@ -8,8 +8,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_variable("isearch_keep_selection", false, | |
"Set to `true' to make isearch leave the selection visible when a "+ | |
"search is completed."); | |
Modified modules/keymap.js | |
diff --git a/modules/keymap.js b/modules/keymap.js | |
index 7f8f0e5..648dded 100644 | |
--- a/modules/keymap.js | |
+++ b/modules/keymap.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/* Generate vk name table */ | |
var keycode_to_vk_name = []; | |
var vk_name_to_keycode = {}; | |
Modified modules/keywords.js | |
diff --git a/modules/keywords.js b/modules/keywords.js | |
index be4c04a..bf5fc8a 100644 | |
--- a/modules/keywords.js | |
+++ b/modules/keywords.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
{ | |
let _keyword_argument_list = []; | |
let _get_keyword_argument_setter = function _get_keyword_argument_setter (name) { | |
Modified modules/labels.js | |
diff --git a/modules/labels.js b/modules/labels.js | |
index aa2c219..24f2bb1 100644 | |
--- a/modules/labels.js | |
+++ b/modules/labels.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("pretty-print.js"); | |
/** | |
Modified modules/load-spec.js | |
diff --git a/modules/load-spec.js b/modules/load-spec.js | |
index c023ff9..ed98691 100644 | |
--- a/modules/load-spec.js | |
+++ b/modules/load-spec.js | |
@@ -49,8 +49,6 @@ | |
* | |
*/ | |
-in_module(null); | |
- | |
require("webjump.js"); | |
function page_fragment_load_spec (elem) { | |
Modified modules/login.js | |
diff --git a/modules/login.js b/modules/login.js | |
index 1a5c025..61267ac 100644 | |
--- a/modules/login.js | |
+++ b/modules/login.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/** | |
* Find and return a login (an nsILoginInfo) matching the given host. The | |
* host can be given as a string (for an exact match) or as a RegExp. | |
Modified modules/media.js | |
diff --git a/modules/media.js b/modules/media.js | |
index e561597..f333d56 100644 | |
--- a/modules/media.js | |
+++ b/modules/media.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/** | |
* Default media scraper | |
* | |
Modified modules/mime-type-override.js | |
diff --git a/modules/mime-type-override.js b/modules/mime-type-override.js | |
index 16beba5..e442ec7 100644 | |
--- a/modules/mime-type-override.js | |
+++ b/modules/mime-type-override.js | |
@@ -23,8 +23,6 @@ | |
* | |
**/ | |
-in_module(null); | |
- | |
let EXAMINE_TOPIC = "http-on-examine-response"; | |
let EXAMINE_MERGED_TOPIC = "http-on-examine-merged-response"; | |
Modified modules/mime.js | |
diff --git a/modules/mime.js b/modules/mime.js | |
index bd460e3..af57a40 100644 | |
--- a/modules/mime.js | |
+++ b/modules/mime.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
const mime_service = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService); | |
/** | |
Modified modules/minibuffer-completion.js | |
diff --git a/modules/minibuffer-completion.js b/modules/minibuffer-completion.js | |
index 80bb340..6832877 100644 | |
--- a/modules/minibuffer-completion.js | |
+++ b/modules/minibuffer-completion.js | |
@@ -10,8 +10,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("minibuffer.js"); | |
/** | |
Modified modules/minibuffer-read-file.js | |
diff --git a/modules/minibuffer-read-file.js b/modules/minibuffer-read-file.js | |
index 3895497..73ce391 100644 | |
--- a/modules/minibuffer-read-file.js | |
+++ b/modules/minibuffer-read-file.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("io.js"); | |
require("minibuffer-completion.js"); | |
Modified modules/minibuffer-read-mime-type.js | |
diff --git a/modules/minibuffer-read-mime-type.js b/modules/minibuffer-read-mime-type.js | |
index 47c699b..6622c71 100644 | |
--- a/modules/minibuffer-read-mime-type.js | |
+++ b/modules/minibuffer-read-mime-type.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("minibuffer-read.js"); | |
let _viewable_mime_type_list = null; | |
Modified modules/minibuffer-read-option.js | |
diff --git a/modules/minibuffer-read-option.js b/modules/minibuffer-read-option.js | |
index a849816..dcdf71b 100644 | |
--- a/modules/minibuffer-read-option.js | |
+++ b/modules/minibuffer-read-option.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("minibuffer-read.js"); | |
define_keywords("$options"); | |
Modified modules/minibuffer-read.js | |
diff --git a/modules/minibuffer-read.js b/modules/minibuffer-read.js | |
index 2877549..431f13a 100644 | |
--- a/modules/minibuffer-read.js | |
+++ b/modules/minibuffer-read.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_variable("default_minibuffer_auto_complete_delay", 150, | |
"Delay (in milliseconds) after the most recent key-stroke "+ | |
"before auto-completing."); | |
Modified modules/minibuffer.js | |
diff --git a/modules/minibuffer.js b/modules/minibuffer.js | |
index 963c3ed..807e423 100644 | |
--- a/modules/minibuffer.js | |
+++ b/modules/minibuffer.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/** | |
* minibuffer_state: abstact base class for minibuffer states. | |
*/ | |
Modified modules/mode-line.js | |
diff --git a/modules/mode-line.js b/modules/mode-line.js | |
index a43a022..d6361b8 100644 | |
--- a/modules/mode-line.js | |
+++ b/modules/mode-line.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("mode.js"); | |
define_window_local_hook("mode_line_hook"); | |
Modified modules/mode.js | |
diff --git a/modules/mode.js b/modules/mode.js | |
index 009946d..c52b483 100644 | |
--- a/modules/mode.js | |
+++ b/modules/mode.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("interactive.js"); | |
function define_global_mode (name, enable, disable) { | |
Modified modules/new-tabs.js | |
diff --git a/modules/new-tabs.js b/modules/new-tabs.js | |
index 6d30be5..2f271d5 100644 | |
--- a/modules/new-tabs.js | |
+++ b/modules/new-tabs.js | |
@@ -12,8 +12,6 @@ | |
* simply override these defaults by normal CSS. | |
**/ | |
-in_module(null); | |
- | |
require("mode.js"); | |
define_variable("tab_bar_button_select", 0, | |
Modified modules/opensearch.js | |
diff --git a/modules/opensearch.js b/modules/opensearch.js | |
index 1cfcfdf..09cafe0 100644 | |
--- a/modules/opensearch.js | |
+++ b/modules/opensearch.js | |
@@ -9,8 +9,6 @@ | |
// Supported OpenSearch parameters | |
// http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_URL_template_syntax | |
-in_module(null); | |
- | |
require("webjump.js"); | |
Modified modules/page-modes/dailymotion.js | |
diff --git a/modules/page-modes/dailymotion.js b/modules/page-modes/dailymotion.js | |
index 65e7c7a..cf2e3e9 100644 | |
--- a/modules/page-modes/dailymotion.js | |
+++ b/modules/page-modes/dailymotion.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
require("media.js"); | |
Modified modules/page-modes/duckduckgo.js | |
diff --git a/modules/page-modes/duckduckgo.js b/modules/page-modes/duckduckgo.js | |
index f9ef7fd..e4a6ca5 100644 | |
--- a/modules/page-modes/duckduckgo.js | |
+++ b/modules/page-modes/duckduckgo.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_keymap("duckduckgo_keymap", $display_name = "duckduckgo"); | |
Modified modules/page-modes/github.js | |
diff --git a/modules/page-modes/github.js b/modules/page-modes/github.js | |
index e374a0b..cb09e45 100644 | |
--- a/modules/page-modes/github.js | |
+++ b/modules/page-modes/github.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_keymap("github_keymap", $display_name = "github"); | |
Modified modules/page-modes/gmail.js | |
diff --git a/modules/page-modes/gmail.js b/modules/page-modes/gmail.js | |
index 396dcc9..930de2b 100644 | |
--- a/modules/page-modes/gmail.js | |
+++ b/modules/page-modes/gmail.js | |
@@ -8,8 +8,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_keymap("gmail_keymap", $display_name = "gmail"); | |
Modified modules/page-modes/gmane.js | |
diff --git a/modules/page-modes/gmane.js b/modules/page-modes/gmane.js | |
index 08060da..6982e36 100644 | |
--- a/modules/page-modes/gmane.js | |
+++ b/modules/page-modes/gmane.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_keymap("gmane_keymap", $display_name = "gmane"); | |
Modified modules/page-modes/google-calendar.js | |
diff --git a/modules/page-modes/google-calendar.js b/modules/page-modes/google-calendar.js | |
index 02dfbf8..60a9b04 100644 | |
--- a/modules/page-modes/google-calendar.js | |
+++ b/modules/page-modes/google-calendar.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_keymap("google_calendar_keymap", $display_name = "google-calendar"); | |
Modified modules/page-modes/google-gqueues.js | |
diff --git a/modules/page-modes/google-gqueues.js b/modules/page-modes/google-gqueues.js | |
index 1165e95..377caf3 100644 | |
--- a/modules/page-modes/google-gqueues.js | |
+++ b/modules/page-modes/google-gqueues.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
Modified modules/page-modes/google-images.js | |
diff --git a/modules/page-modes/google-images.js b/modules/page-modes/google-images.js | |
index ce3d70b..2ba49e7 100644 | |
--- a/modules/page-modes/google-images.js | |
+++ b/modules/page-modes/google-images.js | |
@@ -14,8 +14,6 @@ | |
* annoying frameset page from google again! | |
*/ | |
-in_module(null); | |
- | |
define_variable('google_images_imgrefurl_commands', | |
["follow", "follow-new-buffer", | |
"follow-new-buffer-background", | |
Modified modules/page-modes/google-maps.js | |
diff --git a/modules/page-modes/google-maps.js b/modules/page-modes/google-maps.js | |
index 1e7ab19..8567d26 100644 | |
--- a/modules/page-modes/google-maps.js | |
+++ b/modules/page-modes/google-maps.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
function dom_click_xpath (doc, xpath) { | |
Modified modules/page-modes/google-reader.js | |
diff --git a/modules/page-modes/google-reader.js b/modules/page-modes/google-reader.js | |
index f88b36c..d2b97b3 100644 | |
--- a/modules/page-modes/google-reader.js | |
+++ b/modules/page-modes/google-reader.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
Modified modules/page-modes/google-search-results.js | |
diff --git a/modules/page-modes/google-search-results.js b/modules/page-modes/google-search-results.js | |
index 6951628..d81b967 100644 | |
--- a/modules/page-modes/google-search-results.js | |
+++ b/modules/page-modes/google-search-results.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
Modified modules/page-modes/google-video.js | |
diff --git a/modules/page-modes/google-video.js b/modules/page-modes/google-video.js | |
index 88de416..ff2ca31 100644 | |
--- a/modules/page-modes/google-video.js | |
+++ b/modules/page-modes/google-video.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
require("media.js"); | |
Modified modules/page-modes/google-voice.js | |
diff --git a/modules/page-modes/google-voice.js b/modules/page-modes/google-voice.js | |
index 6eb2355..e761200 100644 | |
--- a/modules/page-modes/google-voice.js | |
+++ b/modules/page-modes/google-voice.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
Modified modules/page-modes/grooveshark.js | |
diff --git a/modules/page-modes/grooveshark.js b/modules/page-modes/grooveshark.js | |
index 797ada0..0a511d8 100644 | |
--- a/modules/page-modes/grooveshark.js | |
+++ b/modules/page-modes/grooveshark.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_keymap("grooveshark_keymap", $display_name = "grooveshark"); | |
Modified modules/page-modes/reddit.js | |
diff --git a/modules/page-modes/reddit.js b/modules/page-modes/reddit.js | |
index 53faa42..d0dd994 100644 | |
--- a/modules/page-modes/reddit.js | |
+++ b/modules/page-modes/reddit.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_variable("reddit_end_behavior", "stop", | |
Modified modules/page-modes/stackexchange.js | |
diff --git a/modules/page-modes/stackexchange.js b/modules/page-modes/stackexchange.js | |
index 903a706..222714d 100644 | |
--- a/modules/page-modes/stackexchange.js | |
+++ b/modules/page-modes/stackexchange.js | |
@@ -10,8 +10,6 @@ | |
* the mouse. | |
*/ | |
-in_module(null); | |
- | |
/** | |
* browser_object_class that finds the vote images | |
*/ | |
Modified modules/page-modes/twitter.js | |
diff --git a/modules/page-modes/twitter.js b/modules/page-modes/twitter.js | |
index eeb6943..2b811d0 100644 | |
--- a/modules/page-modes/twitter.js | |
+++ b/modules/page-modes/twitter.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_keymap("twitter_keymap", $display_name = "twitter"); | |
Modified modules/page-modes/wikipedia.js | |
diff --git a/modules/page-modes/wikipedia.js b/modules/page-modes/wikipedia.js | |
index 747a795..2e78d6d 100644 | |
--- a/modules/page-modes/wikipedia.js | |
+++ b/modules/page-modes/wikipedia.js | |
@@ -14,8 +14,6 @@ | |
* - Probably more to come. | |
**/ | |
-in_module(null); | |
- | |
require("minibuffer-completion.js"); | |
Modified modules/page-modes/xkcd.js | |
diff --git a/modules/page-modes/xkcd.js b/modules/page-modes/xkcd.js | |
index f02701a..62f0d31 100644 | |
--- a/modules/page-modes/xkcd.js | |
+++ b/modules/page-modes/xkcd.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_variable('xkcd_add_title', false, | |
Modified modules/page-modes/youtube-player.js | |
diff --git a/modules/page-modes/youtube-player.js b/modules/page-modes/youtube-player.js | |
index ca3cda7..5ec130d 100644 | |
--- a/modules/page-modes/youtube-player.js | |
+++ b/modules/page-modes/youtube-player.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
define_keymap("youtube_player_keymap", $display_name = "youtube-player"); | |
Modified modules/page-modes/youtube.js | |
diff --git a/modules/page-modes/youtube.js b/modules/page-modes/youtube.js | |
index 8a42761..0d7d26b 100644 | |
--- a/modules/page-modes/youtube.js | |
+++ b/modules/page-modes/youtube.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
require("media.js"); | |
Modified modules/permission-manager.js | |
diff --git a/modules/permission-manager.js b/modules/permission-manager.js | |
index 3676709..08322fd 100644 | |
--- a/modules/permission-manager.js | |
+++ b/modules/permission-manager.js | |
@@ -10,8 +10,6 @@ | |
* blocking whitelist, among other things. | |
*/ | |
-in_module(null); | |
- | |
let permission_manager = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager); | |
let permission_types = { | |
Modified modules/pref.js | |
diff --git a/modules/pref.js b/modules/pref.js | |
index 78042e8..61815d5 100644 | |
--- a/modules/pref.js | |
+++ b/modules/pref.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function set_branch_pref (branch, name, value) { | |
if (typeof(value) == "string") { | |
branch.setCharPref(name, value); | |
Modified modules/pretty-print.js | |
diff --git a/modules/pretty-print.js b/modules/pretty-print.js | |
index 49acef6..104ef91 100644 | |
--- a/modules/pretty-print.js | |
+++ b/modules/pretty-print.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function pretty_print_value (value) { | |
if (value === undefined) | |
return "undefined"; | |
Modified modules/quote.js | |
diff --git a/modules/quote.js b/modules/quote.js | |
index 2fb44b7..a8decad 100644 | |
--- a/modules/quote.js | |
+++ b/modules/quote.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_buffer_mode("quote-next-mode", | |
function enable (buffer) { | |
buffer.override_keymaps([quote_next_keymap]); | |
Modified modules/rc.js | |
diff --git a/modules/rc.js b/modules/rc.js | |
index 780d6ed..bd25727 100644 | |
--- a/modules/rc.js | |
+++ b/modules/rc.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
let (default_rc = get_home_directory()) { | |
default_rc.appendRelativePath(".conkerorrc"); | |
default_pref("conkeror.rcfile", default_rc.path); | |
Modified modules/save.js | |
diff --git a/modules/save.js b/modules/save.js | |
index e71f051..e4044b1 100644 | |
--- a/modules/save.js | |
+++ b/modules/save.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("content-buffer.js"); | |
require("load-spec.js"); | |
require("suggest-file-name.js"); | |
Modified modules/scroll.js | |
diff --git a/modules/scroll.js b/modules/scroll.js | |
index 8db8bd5..db0d664 100644 | |
--- a/modules/scroll.js | |
+++ b/modules/scroll.js | |
@@ -6,9 +6,6 @@ | |
* COPYING file. | |
**/ | |
- | |
-in_module(null); | |
- | |
define_variable("headings_xpath", | |
"//h1 | //h2 | //h3 | //h4 | //h5 | //h6 | //xhtml:h1 | "+ | |
"//xhtml:h2 | //xhtml:h3 | //xhtml:h4 | //xhtml:h5 | //xhtml:h6", | |
Modified modules/selectively-unstyle.js | |
diff --git a/modules/selectively-unstyle.js b/modules/selectively-unstyle.js | |
index 6ca95da..a38219e 100644 | |
--- a/modules/selectively-unstyle.js | |
+++ b/modules/selectively-unstyle.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_variable('selectively_unstyle_alist', [], | |
"Alist mapping url-matching regular expressions to predicates to "+ | |
"selectively disable stylesheets. All predicates corresponding to "+ | |
Modified modules/services.js | |
diff --git a/modules/services.js b/modules/services.js | |
index cd18768..f891f6c 100644 | |
--- a/modules/services.js | |
+++ b/modules/services.js | |
@@ -13,8 +13,6 @@ | |
* best, because it keeps all the code in one place. | |
*/ | |
-in_module(null); | |
- | |
const file_locator_service = Cc["@mozilla.org/file/directory_service;1"] | |
.getService(Ci.nsIProperties); | |
Modified modules/session.js | |
diff --git a/modules/session.js b/modules/session.js | |
index 45cce7b..a59a327 100644 | |
--- a/modules/session.js | |
+++ b/modules/session.js | |
@@ -32,8 +32,6 @@ | |
* fail and return without telling the user why we are doing so. | |
*/ | |
-in_module(null); | |
- | |
{ | |
//// Manual sessions. //// | |
Modified modules/source-code.js | |
diff --git a/modules/source-code.js b/modules/source-code.js | |
index a94a073..1b90e08 100644 | |
--- a/modules/source-code.js | |
+++ b/modules/source-code.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require_later("external-editor.js"); | |
var conkeror_source_code_path = null; | |
Modified modules/spawn-process.js | |
diff --git a/modules/spawn-process.js b/modules/spawn-process.js | |
index 79766d4..5e94175 100644 | |
--- a/modules/spawn-process.js | |
+++ b/modules/spawn-process.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("interactive.js"); | |
require("io.js"); | |
require("env.js"); | |
Modified modules/special-buffer.js | |
diff --git a/modules/special-buffer.js b/modules/special-buffer.js | |
index 7549ba8..47374cd 100644 | |
--- a/modules/special-buffer.js | |
+++ b/modules/special-buffer.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("buffer.js"); | |
define_buffer_local_hook("special_buffer_generated_hook"); | |
Modified modules/ssl.js | |
diff --git a/modules/ssl.js b/modules/ssl.js | |
index e2a96bb..5344e8f 100644 | |
--- a/modules/ssl.js | |
+++ b/modules/ssl.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function ssl_add_exception(buffer) { | |
/* FIXME: A user preference variable should specify whether to | |
* pre-fill location and furthermore (dependent on pre-filling the | |
Modified modules/string.js | |
diff --git a/modules/string.js b/modules/string.js | |
index a8c1a0f..778f4d9 100644 | |
--- a/modules/string.js | |
+++ b/modules/string.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/** | |
* trim_whitespace removes whitespace from the beginning and end of the | |
* given string. | |
Modified modules/stylesheet.js | |
diff --git a/modules/stylesheet.js b/modules/stylesheet.js | |
index 5a60665..518df3f 100644 | |
--- a/modules/stylesheet.js | |
+++ b/modules/stylesheet.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function register_user_stylesheet (url) { | |
var uri = make_uri(url); | |
var sss = Cc["@mozilla.org/content/style-sheet-service;1"] | |
Modified modules/suggest-file-name.js | |
diff --git a/modules/suggest-file-name.js b/modules/suggest-file-name.js | |
index 5857fd6..6edeae1 100644 | |
--- a/modules/suggest-file-name.js | |
+++ b/modules/suggest-file-name.js | |
@@ -9,8 +9,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/** | |
* maybe_get_filename_extension | |
* | |
Modified modules/tab-bar.js | |
diff --git a/modules/tab-bar.js b/modules/tab-bar.js | |
index 33d0f7e..afadc6e 100644 | |
--- a/modules/tab-bar.js | |
+++ b/modules/tab-bar.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("favicon.js"); | |
require("mode.js"); | |
Modified modules/text.js | |
diff --git a/modules/text.js b/modules/text.js | |
index 036d506..93d10ed 100644 | |
--- a/modules/text.js | |
+++ b/modules/text.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
/** | |
* Given a callback func and an interactive context I, call func, passing | |
* either a focused field, or the minibuffer's input element if the | |
Modified modules/theme.js | |
diff --git a/modules/theme.js b/modules/theme.js | |
index c8dbd74..3a07611 100644 | |
--- a/modules/theme.js | |
+++ b/modules/theme.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
{ | |
let themes = {}; | |
let loaded_themes = {}; | |
Modified modules/timer.js | |
diff --git a/modules/timer.js b/modules/timer.js | |
index e245f7f..e025793 100644 | |
--- a/modules/timer.js | |
+++ b/modules/timer.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function timer_callback (callback) { | |
this.callback = callback; | |
} | |
Modified modules/universal-argument.js | |
diff --git a/modules/universal-argument.js b/modules/universal-argument.js | |
index 82a6e5f..69ec8b2 100644 | |
--- a/modules/universal-argument.js | |
+++ b/modules/universal-argument.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
define_keymap("universal_argument_keymap"); | |
interactive("universal-argument", | |
Modified modules/user-variable.js | |
diff --git a/modules/user-variable.js b/modules/user-variable.js | |
index 97ca174..59c7c09 100644 | |
--- a/modules/user-variable.js | |
+++ b/modules/user-variable.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("source-code.js"); | |
var user_variables = {}; | |
Modified modules/utils.js | |
diff --git a/modules/utils.js b/modules/utils.js | |
index 89fde07..8164bc9 100644 | |
--- a/modules/utils.js | |
+++ b/modules/utils.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("io"); | |
function string_hashset () {} | |
Modified modules/walnut.js | |
diff --git a/modules/walnut.js b/modules/walnut.js | |
index cceab15..63e89d5 100644 | |
--- a/modules/walnut.js | |
+++ b/modules/walnut.js | |
@@ -5,8 +5,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
function assert (got) { | |
if (! got) | |
throw new Error("expected a true value, got <"+got+">."); | |
Modified modules/webjump.js | |
diff --git a/modules/webjump.js b/modules/webjump.js | |
index 8e2fa1e..570326b 100644 | |
--- a/modules/webjump.js | |
+++ b/modules/webjump.js | |
@@ -7,8 +7,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
var webjumps = {}; | |
define_keywords("$completer", "$description", "$argument", "$alternative", | |
Modified modules/window.js | |
diff --git a/modules/window.js b/modules/window.js | |
index 2c064e0..561570f 100644 | |
--- a/modules/window.js | |
+++ b/modules/window.js | |
@@ -6,8 +6,6 @@ | |
* COPYING file. | |
**/ | |
-in_module(null); | |
- | |
require("mode.js"); | |
var define_window_local_hook = simple_local_hook_definer(); | |
Modified modules/zoom.js | |
diff --git a/modules/zoom.js b/modules/zoom.js | |
index d303396..d0182c4 100644 | |
--- a/modules/zoom.js | |
+++ b/modules/zoom.js | |
@@ -12,8 +12,6 @@ | |
* Text and full-page zoom | |
*/ | |
-in_module(null); | |
- | |
var zoom_levels = [ 1, 10, 25, 50, 75, 90, 100, | |
120, 150, 200, 300, 500, 1000, 2000 ]; | |
Modified tests/simple/modules.js | |
diff --git a/tests/simple/modules.js b/tests/simple/modules.js | |
index 26cf4a1..a88dc11 100644 | |
--- a/tests/simple/modules.js | |
+++ b/tests/simple/modules.js | |
@@ -21,7 +21,6 @@ walnut_run({ | |
this._load_paths = load_paths; | |
this._loading_paths = loading_paths; | |
this._loading_urls = loading_urls; | |
- this._loading_modules = loading_modules; | |
this._loading_features = loading_features; | |
this._pending_loads = pending_loads; | |
this._features = features; | |
@@ -38,7 +37,6 @@ walnut_run({ | |
load_url = this._load_url; | |
loading_paths = this._loading_paths; | |
loading_urls = this._loading_urls; | |
- loading_modules = this._loading_modules; | |
loading_features = this._loading_features; | |
pending_loads = this._pending_loads; | |
features = this._features; | |
@@ -130,7 +128,6 @@ walnut_run({ | |
this._load_paths = load_paths; | |
this._loading_paths = loading_paths; | |
this._loading_urls = loading_urls; | |
- this._loading_modules = loading_modules; | |
this._loading_features = loading_features; | |
this._pending_loads = pending_loads; | |
this._features = features; | |
@@ -142,38 +139,11 @@ walnut_run({ | |
load_url = this._load_url; | |
loading_paths = this._loading_paths; | |
loading_urls = this._loading_urls; | |
- loading_modules = this._loading_modules; | |
loading_features = this._loading_features; | |
pending_loads = this._pending_loads; | |
features = this._features; | |
after_load_functions = this._after_load_functions; | |
}, | |
- test_load__in_module_conflict_1: function () { | |
- load_url = function () { | |
- in_module(null); | |
- in_module("bar"); | |
- }; | |
- var err; | |
- try { | |
- load("foo"); | |
- } catch (e) { | |
- err = e; | |
- } | |
- assert(err instanceof module_assert_conflict_error); | |
- }, | |
- test_load__in_module_conflict_2: function () { | |
- load_url = function () { | |
- in_module(null); | |
- in_module("bar"); | |
- }; | |
- var err; | |
- try { | |
- load(make_uri("chrome://conkeror/content/foo.js")); | |
- } catch (e) { | |
- err = e; | |
- } | |
- assert(err instanceof module_assert_conflict_error); | |
- }, | |
test_load__circular_load_is_error: function () { | |
load_url = function () { | |
load(make_uri("chrome://conkeror/content/foo.js")); | |
@@ -186,7 +156,6 @@ walnut_run({ | |
load_paths = []; | |
loading_paths = []; | |
loading_urls = []; | |
- loading_modules = []; | |
loading_features = []; | |
pending_loads = []; | |
assert_error(function () load("foo")); | |
@@ -196,14 +165,12 @@ walnut_run({ | |
pending_loads = []; | |
var ob = ""; | |
function mock_foo () { | |
- in_module(null); | |
ob += "a"; | |
require_later("bar"); | |
ob += "b"; | |
load_url = mock_bar; | |
} | |
function mock_bar () { | |
- in_module(null); | |
ob += "c"; | |
} | |
load_url = mock_foo; | |
@@ -213,7 +180,6 @@ walnut_run({ | |
test_require_later_2: function () { | |
loading_paths = []; | |
loading_urls = []; | |
- loading_modules = []; | |
loading_features = []; | |
pending_loads = []; | |
after_load_functions = []; | |
@@ -221,25 +187,21 @@ walnut_run({ | |
var ob = []; | |
var mock_modules = { | |
foo: function () { | |
- in_module(null); | |
ob.push("foo"); | |
require_later("baz"); | |
require("bar"); | |
provide("foo"); | |
}, | |
bar: function () { | |
- in_module(null); | |
ob.push("bar"); | |
provide("bar"); | |
}, | |
baz: function () { | |
- in_module(null); | |
ob.push("baz"); | |
require_later("quux"); | |
provide("baz"); | |
}, | |
quux: function () { | |
- in_module(null); | |
ob.push("quux"); | |
provide("quux"); | |
} | |
@@ -256,18 +218,14 @@ walnut_run({ | |
// after the completion of the load which provided the feature. | |
loading_paths = []; | |
loading_urls = []; | |
- loading_modules = []; | |
loading_features = []; | |
pending_loads = []; | |
after_load_functions = []; | |
features = {}; | |
- var oldfoo = conkeror.foo; | |
- | |
var called = false; | |
var mock_modules = { | |
foo: function () { | |
- in_module("foo"); | |
called = true; | |
provide("foo"); | |
assert_not(featurep("foo")); | |
@@ -280,42 +238,10 @@ walnut_run({ | |
load("foo"); | |
assert(called); | |
assert(featurep("foo")); | |
- | |
- conkeror.foo = oldfoo; | |
- }, | |
- test_call_after_load: function () { | |
- loading_paths = []; | |
- loading_urls = []; | |
- loading_modules = []; | |
- loading_features = []; | |
- pending_loads = []; | |
- after_load_functions = []; | |
- features = {}; | |
- | |
- var oldfoo = conkeror.foo; | |
- | |
- var mock_modules = { | |
- foo: function () { | |
- in_module("foo"); | |
- provide("foo"); | |
- } | |
- }; | |
- load_url = function (url) { | |
- var module = url.substr(url.lastIndexOf('/')+1); | |
- mock_modules[module](); | |
- }; | |
- call_after_load("foo", function () { | |
- foo.called = true; | |
- }); | |
- load("foo"); | |
- assert(foo.called); | |
- | |
- conkeror.foo = oldfoo; | |
}, | |
test_provide: function () { | |
loading_paths = []; | |
loading_urls = []; | |
- loading_modules = []; | |
loading_features = []; | |
pending_loads = []; | |
after_load_functions = []; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment