Bug 744698 - Close the stream once commit is complete. r=gavin

This commit is contained in:
David Rajchenbach-Teller 2012-04-27 09:15:37 +02:00
parent 7a2a29c947
commit 4486af56f3
2 changed files with 2 additions and 0 deletions

View File

@ -3756,6 +3756,7 @@ var engineMetadataService = {
let callback = function(result) {
if (Components.isSuccessCode(result)) {
ostream.close();
Services.obs.notifyObservers(null,
SEARCH_SERVICE_TOPIC,
SEARCH_SERVICE_METADATA_WRITTEN);

View File

@ -67,6 +67,7 @@ function run_test()
// Check that the entries are placed as specified correctly
let stream = NetUtil.newChannel(metadata).open();
do_print("Parsing metadata");
let json = parseJsonFromStream(stream);
do_check_eq(json["[app]/test-search-engine.xml"].order, 1);
do_check_eq(json["[profile]/sherlock-test-search-engine.xml"].order, 2);