Backed out changeset 2e55203d7b80 to fix orange (test_bug508115.xul timing out).

This commit is contained in:
L. David Baron 2010-09-13 20:44:17 -07:00
Родитель d49ef5323f
Коммит ae75dfe8d9
4 изменённых файлов: 18 добавлений и 26 удалений

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

@ -91,8 +91,4 @@
#define NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 99)
/* Error codes for XBL */
#define NS_ERROR_XBL_BLOCKED \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_CONTENT, 15)
#endif // nsContentErrors_h___

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

@ -76,7 +76,6 @@
#include "nsIDOM3Node.h"
#include "nsContentPolicyUtils.h"
#include "nsTArray.h"
#include "nsContentErrors.h"
#include "nsIPresShell.h"
#include "nsIDocumentObserver.h"
@ -1108,7 +1107,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement,
gAllowDataURIs,
nsIContentPolicy::TYPE_XBL,
aBoundDocument);
NS_ENSURE_SUCCESS(rv, NS_ERROR_XBL_BLOCKED);
NS_ENSURE_SUCCESS(rv, rv);
if (!IsSystemOrChromeURLPrincipal(aOriginPrincipal)) {
// Also make sure that we're same-origin with the bound document
@ -1117,12 +1116,12 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement,
!SchemeIs(aBindingURI, "chrome")) {
rv = aBoundDocument->NodePrincipal()->CheckMayLoad(aBindingURI,
PR_TRUE);
NS_ENSURE_SUCCESS(rv, NS_ERROR_XBL_BLOCKED);
NS_ENSURE_SUCCESS(rv, rv);
}
// Finally check if this document is allowed to use XBL at all.
NS_ENSURE_TRUE(aBoundDocument->AllowXULXBL(),
NS_ERROR_XBL_BLOCKED);
NS_ERROR_NOT_AVAILABLE);
}
}

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

@ -72,9 +72,6 @@ _TEST_FILES = \
file_bug481558.xbl \
test_bug526178.xhtml \
test_bug542406.xhtml \
test_bug591198.html \
file_bug591198_xbl.xml \
file_bug591198_inner.html \
$(NULL)
libs:: $(_TEST_FILES)

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

@ -2341,7 +2341,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
display->mBinding->mOriginPrincipal,
PR_FALSE, getter_AddRefs(binding),
&resolveStyle);
if (NS_FAILED(rv) && rv != NS_ERROR_XBL_BLOCKED)
if (NS_FAILED(rv))
return NS_OK; // Binding will load asynchronously.
if (binding) {
@ -2349,12 +2349,12 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
// after all of its kids' constructors. So tell the binding
// manager about it right now.
mDocument->BindingManager()->AddToAttachedQueue(binding);
}
if (resolveStyle) {
styleContext = mPresShell->StyleSet()->ResolveStyleFor(aDocElement,
nsnull);
display = styleContext->GetStyleDisplay();
}
if (resolveStyle) {
styleContext = mPresShell->StyleSet()->ResolveStyleFor(aDocElement,
nsnull);
display = styleContext->GetStyleDisplay();
}
}
@ -5095,22 +5095,22 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
PR_FALSE,
getter_AddRefs(newPendingBinding->mBinding),
&resolveStyle);
if (NS_FAILED(rv) && rv != NS_ERROR_XBL_BLOCKED)
if (NS_FAILED(rv))
return;
if (newPendingBinding->mBinding) {
pendingBinding = newPendingBinding;
// aState takes over owning newPendingBinding
aState.AddPendingBinding(newPendingBinding.forget());
if (resolveStyle) {
styleContext = ResolveStyleContext(styleContext->GetParent(), aContent);
display = styleContext->GetStyleDisplay();
aStyleContext = styleContext;
}
aTag = mDocument->BindingManager()->ResolveTag(aContent, &aNameSpaceID);
}
if (resolveStyle) {
styleContext = ResolveStyleContext(styleContext->GetParent(), aContent);
display = styleContext->GetStyleDisplay();
aStyleContext = styleContext;
}
aTag = mDocument->BindingManager()->ResolveTag(aContent, &aNameSpaceID);
}
PRBool isGeneratedContent = ((aFlags & ITEM_IS_GENERATED_CONTENT) != 0);