From ce6147f60838862d11614ff7d986f85730172ffa Mon Sep 17 00:00:00 2001 From: John Foerch Date: Sun, 2 Oct 2011 17:32:35 -0400 Subject: [PATCH] evaluate: invalidate startup cache before loading temp file From XULRunner 8.0, subscript_loader.loadSubScript now makes use of the startup cache to speed up repeated loads of javascript files. This makes it necessary for our evaluate command (M-:) to invalidate that cache before loading from its temp file. resolves issue360 --- modules/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/utils.js b/modules/utils.js index 2eeef1b..f0c9846 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -861,6 +861,9 @@ function do_when (hook, buffer, fun) { */ function evaluate (s) { try { + var obs = Cc["@mozilla.org/observer-service;1"] + .getService(Ci.nsIObserverService); + obs.notifyObservers(null, "startupcache-invalidate", null); var temp = get_temporary_file("conkeror-evaluate.tmp.js"); write_text_file(temp, s); var url = make_uri(temp).spec; -- 2.11.4.GIT