Bug 1101124 - Check for a pref to always stop slow scripts r=bz

This commit is contained in:
Tobias Schneider 2014-11-20 20:25:39 -08:00
Родитель 6a8fa342ed
Коммит ee65ddc5cb
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -11071,6 +11071,10 @@ nsGlobalWindow::ShowSlowScriptDialog()
nsresult rv;
AutoJSContext cx;
if (Preferences::GetBool("dom.always_stop_slow_scripts")) {
return KillSlowScript;
}
// If it isn't safe to run script, then it isn't safe to bring up the prompt
// (since that spins the event loop). In that (rare) case, we just kill the
// script and report a warning.