зеркало из https://github.com/mozilla/pjs.git
Bug 534478, prevent assertions caused by reftest pagemode, r=dbaron
--HG-- extra : rebase_source : c2bec911560c952009783a83a93ced887447937d
This commit is contained in:
Родитель
4fa0b3da0d
Коммит
5285140c59
|
@ -943,9 +943,12 @@ DocumentViewerImpl::InitInternal(nsIWidget* aParentWidget,
|
|||
getter_AddRefs(window));
|
||||
|
||||
if (window) {
|
||||
window->SetNewDocument(mDocument, aState);
|
||||
|
||||
nsJSContext::LoadStart();
|
||||
nsCOMPtr<nsIDocument> curDoc =
|
||||
do_QueryInterface(window->GetExtantDocument());
|
||||
if (!mIsPageMode || curDoc != mDocument) {
|
||||
window->SetNewDocument(mDocument, aState);
|
||||
nsJSContext::LoadStart();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2368,7 +2371,7 @@ DocumentViewerImpl::FindContainerView()
|
|||
nsresult
|
||||
DocumentViewerImpl::CreateDeviceContext(nsIView* aContainerView)
|
||||
{
|
||||
NS_PRECONDITION(!mPresShell && !mPresContext && !mWindow,
|
||||
NS_PRECONDITION(!mPresShell && !mWindow,
|
||||
"This will screw up our existing presentation");
|
||||
NS_PRECONDITION(mDocument, "Gotta have a document here");
|
||||
|
||||
|
|
|
@ -744,13 +744,9 @@ function OnDocumentLoad(event)
|
|||
ps.footerStrRight = "";
|
||||
gBrowser.docShell.contentViewer.setPageMode(true, ps);
|
||||
|
||||
// WORKAROUND FOR ASSERTIONS IN BUG 534478: Calling setPageMode
|
||||
// above causes 2 assertions. So that we don't have to annotate
|
||||
// the manifests for every reftest-print reftest, bump the
|
||||
// assertion count by two right here.
|
||||
// And on Mac, it causes *three* assertions.
|
||||
// WORKAROUND FOR AN ASSERTION ON MAC!
|
||||
var xr = CC[NS_XREAPPINFO_CONTRACTID].getService(CI.nsIXULRuntime);
|
||||
var count = (xr.widgetToolkit == "cocoa") ? 3 : 2;
|
||||
var count = (xr.widgetToolkit == "cocoa") ? 1 : 0;
|
||||
gURLs[0].minAsserts += count;
|
||||
gURLs[0].maxAsserts += count;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче