[Pkg-mozext-commits] [wot] 63/226: Bug fixes, cleaning the code and updated build script

David Prévot taffit at moszumanska.debian.org
Fri May 1 00:35:35 UTC 2015


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

taffit pushed a commit to branch master
in repository wot.

commit fabf2159f9a76151d0f9cf4a5f9f7916fc5cc695
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date:   Wed Jan 2 13:02:14 2013 +0200

    Bug fixes, cleaning the code and updated build script
---
 build              |  2 ++
 chrome.manifest    |  4 ++--
 content/surveys.js | 11 +++++------
 content/util.js    |  3 ++-
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/build b/build
index 2c06067..f5105fc 100755
--- a/build
+++ b/build
@@ -192,9 +192,11 @@ echo "$0: updating chrome.manifest"
 cd "${FINAL_DIR}"
 
 S_CONTENT="s/^(content[[:space:]]+[^[:space:]]+[[:space:]]+)(.+)$/\\1jar:chrome\\/${APP_NAME}\.jar!\\/\\2/"
+S_RESOURCE="s/^(resource[[:space:]]+[^[:space:]]+[[:space:]]+)(.+)$/\\1jar:resource\\/${APP_NAME}\.jar!\\/\\2/"
 S_LOCSKIN="s/^(skin|locale)([[:space:]]+[^[:space:]]+[[:space:]]+[^[:space:]]+[[:space:]]+)(.*)$/\\1\\2jar:chrome\\/${APP_NAME}\.jar!\\/\\3/"
 
 sed -i -r -e "$S_CONTENT" chrome.manifest
+sed -i -r -e "$S_RESOURCE" chrome.manifest
 sed -i -r -e "$S_LOCSKIN" chrome.manifest
 
 ## Create the XPI and sign it
diff --git a/chrome.manifest b/chrome.manifest
index 6e2f945..1e78bf5 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -1,6 +1,6 @@
-content	    wot    content/
+content     wot    content/
 content     wot    content/ contentaccessible=yes
-resource	wot-base-dir content/
+resource    wot-base-dir content/
 overlay	chrome://browser/content/browser.xul	chrome://wot/content/overlay.xul
 overlay	chrome://navigator/content/navigatorOverlay.xul	chrome://wot/content/overlay.xul
 locale	wot	en-US	locale/en-US/
diff --git a/content/surveys.js b/content/surveys.js
index 6b03e74..273bdc9 100644
--- a/content/surveys.js
+++ b/content/surveys.js
@@ -30,8 +30,6 @@ var wot_surveys = {
 	fbl_form_uri:       "api.mywot.com/feedback/1/surveys.html",    // don't forget to change version!
 	re_fbl_uri:         null,
 	wrapper_id:         "wot_surveys_wrapper",
-	is_shown:           false,
-	wrapper:            null,
 	pheight:            350,
 	pwidth:             392,
 	px:                 10,
@@ -67,7 +65,9 @@ var wot_surveys = {
 		this.re_fbl_uri = new RegExp("^" + wot_surveys.fbl_form_uri, "i");  // prepare RegExp once to use often
 
 		// Load the JSON stored data about asked websites
-		wot_surveys.asked.load_from_file();
+		if (!wot_surveys.asked.is_loaded()) {
+			wot_surveys.asked.load_from_file();
+		}
 	},
 
 	domcontentloaded: function(event)
@@ -119,7 +119,8 @@ var wot_surveys = {
 
 	unload: function (event)
 	{
-		wot_surveys.asked.dump_to_file();   // save state to the file
+		// dumping global hash table on unloading doesn't work here since wot_hashtable is already unloaded
+//		wot_surveys.asked.dump_to_file();   // save state to the file
 	},
 
 	get_or_create_sandbox: function(content)
@@ -210,8 +211,6 @@ var wot_surveys = {
 			return;
 		}
 
-		ws.wrapper = wrapper;  // keep the link to the element to destroy it
-
 		wrapper.setAttribute("scrolling", "no");
 
 		wrapper.setAttribute("style",
diff --git a/content/util.js b/content/util.js
index d5a2bf3..21c8759 100644
--- a/content/util.js
+++ b/content/util.js
@@ -1027,7 +1027,7 @@ var wot_css =
 	}
 };
 
-wot_file = {
+var wot_file = {
 
 	wot_dir: "WOT",
 
@@ -1063,6 +1063,7 @@ wot_file = {
 							callback(res);
 						}
 					}
+					callback({});   // whether no data is loaded call it anyway to finish the load process
 
 				} catch (e) {
 					dump("utils.wot_file.read_json() is failed with " + e + "\n");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git



More information about the Pkg-mozext-commits mailing list