Bug 905364 - Force the SafeJSContext to fire up in xpcshell. r=bz

This commit is contained in:
Bobby Holley 2013-09-06 11:35:12 -07:00
Родитель 7f2cb5dc2c
Коммит 8bd42b92b1
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -1676,6 +1676,11 @@ main(int argc, char **argv, char **envp)
return 1;
}
// Force the SafeJSContext to be created. This is a workaround for our
// implicit dependency on keeping at least one JSContext alive until the
// end of shutdown. This can go away when we get bug 905926 landed.
xpc->GetSafeJSContext();
nsCOMPtr<nsIPrincipal> systemprincipal;
// Fetch the system principal and store it away in a global, to use for
// script compilation in Load() and ProcessFile() (including interactive