Backed out changeset 689690a17de3 (bug 833143) since the attempt at merging the backout from m-c was lost.

This commit is contained in:
Ryan VanderMeulen 2013-01-24 16:35:31 -05:00
Родитель d59f924161
Коммит d99064f8bc
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -847,6 +847,19 @@ nsXREDirProvider::DoShutdown()
obsSvc->NotifyObservers(nullptr, "profile-change-net-teardown", kShutdownPersist);
obsSvc->NotifyObservers(nullptr, "profile-change-teardown", kShutdownPersist);
// Phase 2c: Now that things are torn down, force JS GC so that things which depend on
// resources which are about to go away in "profile-before-change" are destroyed first.
nsCOMPtr<nsIJSRuntimeService> rtsvc
(do_GetService("@mozilla.org/js/xpc/RuntimeService;1"));
if (rtsvc)
{
JSRuntime *rt = nullptr;
rtsvc->GetRuntime(&rt);
if (rt)
::JS_GC(rt);
}
// Phase 3: Notify observers of a profile change
obsSvc->NotifyObservers(nullptr, "profile-before-change", kShutdownPersist);
}