summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-05 11:21:12 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-05 11:21:12 +0200
commitbbdd1c93187fb013aac1aec330323a6d01f0562f (patch)
tree06dbbb0de04eceb7f52b742adc5d6a2f50c652a3 /toolkit
parentae432c63672cd4c24204b9dd4a92470a710d2d98 (diff)
downloadUXP-bbdd1c93187fb013aac1aec330323a6d01f0562f.tar
UXP-bbdd1c93187fb013aac1aec330323a6d01f0562f.tar.gz
UXP-bbdd1c93187fb013aac1aec330323a6d01f0562f.tar.lz
UXP-bbdd1c93187fb013aac1aec330323a6d01f0562f.tar.xz
UXP-bbdd1c93187fb013aac1aec330323a6d01f0562f.zip
Write out serialized search engine files when rebuilding cache.
This makes sure that any in-browser edits of search engines (searchplugins) are made permanent on disk. Ref: https://forum.palemoon.org/viewtopic.php?f=13&t=20296 (Ketmar)
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/search/orginal/nsSearchService.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/toolkit/components/search/orginal/nsSearchService.js b/toolkit/components/search/orginal/nsSearchService.js
index 56d378b39..c7b847905 100644
--- a/toolkit/components/search/orginal/nsSearchService.js
+++ b/toolkit/components/search/orginal/nsSearchService.js
@@ -3058,6 +3058,11 @@ SearchService.prototype = {
continue;
}
+ // Write out serialized search engine files when rebuilding cache.
+ if (!engine._readOnly && engine._file) {
+ engine._serializeToFile();
+ }
+
let cacheKey = parent.path;
if (!cache.directories[cacheKey]) {
let cacheEntry = {};