diff options
author | Koen Kooi <koen.kooi@linaro.org> | 2014-07-14 08:25:37 +0200 |
---|---|---|
committer | Koen Kooi <koen.kooi@linaro.org> | 2014-07-14 08:26:14 +0200 |
commit | 876bd66b98f4cd125aeb0e641643e8b6fc7b0ef8 (patch) | |
tree | 96d6b6ae43116702212d253ecb5bbc7973981746 /meta-linaro-integration/recipes-overlayed/firefox/firefox/debian-hacks/Handle-transition-to-etc-appname-searchplugins-more-.patch | |
parent | 1e27f7efae3e00440044b7a61b6196b51aeab71a (diff) |
firefox: overlay recipes for freetype buildfix
Change-Id: I0a276fad3e59aab2fded152e013a022d289dfd67
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Diffstat (limited to 'meta-linaro-integration/recipes-overlayed/firefox/firefox/debian-hacks/Handle-transition-to-etc-appname-searchplugins-more-.patch')
-rw-r--r-- | meta-linaro-integration/recipes-overlayed/firefox/firefox/debian-hacks/Handle-transition-to-etc-appname-searchplugins-more-.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/debian-hacks/Handle-transition-to-etc-appname-searchplugins-more-.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/debian-hacks/Handle-transition-to-etc-appname-searchplugins-more-.patch new file mode 100644 index 00000000..7259c97b --- /dev/null +++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/debian-hacks/Handle-transition-to-etc-appname-searchplugins-more-.patch @@ -0,0 +1,73 @@ +From: Mike Hommey <mh@glandium.org> +Date: Sun, 15 Apr 2012 11:38:32 +0200 +Subject: Handle transition to /etc/<appname>/searchplugins more gracefully + +Closes: #666675. +--- + toolkit/components/search/nsSearchService.js | 32 ++++++++++++++++++++++++-- + 1 file changed, 30 insertions(+), 2 deletions(-) + +diff --git a/toolkit/components/search/nsSearchService.js b/toolkit/components/search/nsSearchService.js +index 2807835..8fa31ca 100644 +--- a/toolkit/components/search/nsSearchService.js ++++ b/toolkit/components/search/nsSearchService.js +@@ -710,6 +710,7 @@ function getMozParamPref(prefName) + * + * @see nsIBrowserSearchService.idl + */ ++let gForceCacheInvalidation = false; + let gEnginesLoaded = false; + function notifyAction(aEngine, aVerb) { + if (gEnginesLoaded) { +@@ -2012,6 +2013,20 @@ Engine.prototype = { + **/ + _initWithJSON: function SRCH_ENG__initWithJSON(aJson) { + this.__id = aJson._id; ++ try { ++ let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); ++ file.initWithPath(this.__id); ++ let loadDirs = []; ++ let locations = getDir(NS_APP_SEARCH_DIR_LIST, Ci.nsISimpleEnumerator); ++ while (locations.hasMoreElements()) { ++ let dir = locations.getNext().QueryInterface(Ci.nsIFile); ++ loadDirs.push(dir); ++ } ++ if (loadDirs.some(function (element) element.equals(file.parent))) { ++ this.__id = "[app]/" + file.leafName; ++ gForceCacheInvalidation = true; ++ } ++ } catch (e) { } + this._name = aJson._name; + this._description = aJson.description; + if (aJson._hasPreferredIcon == undefined) +@@ -2306,8 +2321,19 @@ Engine.prototype = { + this.__installLocation = SEARCH_APP_DIR; + else if (this._file.parent.equals(getDir(NS_APP_USER_SEARCH_DIR))) + this.__installLocation = SEARCH_PROFILE_DIR; +- else +- this.__installLocation = SEARCH_IN_EXTENSION; ++ else { ++ let loadDirs = []; ++ let locations = getDir(NS_APP_SEARCH_DIR_LIST, Ci.nsISimpleEnumerator); ++ while (locations.hasMoreElements()) { ++ let dir = locations.getNext().QueryInterface(Ci.nsIFile); ++ loadDirs.push(dir); ++ } ++ let parent = this._file.parent; ++ if (loadDirs.some(function (element) !element.equals(parent))) ++ this.__installLocation = SEARCH_APP_DIR; ++ else ++ this.__installLocation = SEARCH_IN_EXTENSION; ++ } + } + + return this.__installLocation; +@@ -2471,6 +2497,8 @@ function SearchService() { + } + gEnginesLoaded = true; + this._addObservers(); ++ if (gForceCacheInvalidation) ++ this._batchCacheInvalidation(); + } + SearchService.prototype = { + classID: Components.ID("{7319788a-fe93-4db3-9f39-818cf08f4256}"), |