Bug 528493. Prevent script execution while initializing nsDocumentViewer. r=bzbarsky

This commit is contained in:
Robert O'Callahan 2009-11-19 12:40:31 +13:00
Родитель 64c98f1baa
Коммит 9feef10059
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -839,6 +839,11 @@ DocumentViewerImpl::InitInternal(nsIWidget* aParentWidget,
PRBool aInPrintPreview,
PRBool aNeedMakeCX /*= PR_TRUE*/)
{
// We don't want any scripts to run here. That can cause flushing,
// which can cause reentry into initialization of this document viewer,
// which would be disastrous.
nsAutoScriptBlocker blockScripts;
mParentWidget = aParentWidget; // not ref counted
mBounds = aBounds;