Back out bug 846890 for reftest orange

This commit is contained in:
Bill McCloskey 2013-03-08 21:27:25 -08:00
parent 611c1b675e
commit 7401ed1cc2
5 changed files with 9 additions and 48 deletions

View File

@ -144,16 +144,6 @@ XULContentSinkImpl::ContextStack::Clear()
mDepth = 0;
}
void
XULContentSinkImpl::ContextStack::Traverse(nsCycleCollectionTraversalCallback& aCb)
{
nsCycleCollectionTraversalCallback& cb = aCb;
for (ContextStack::Entry* tmp = mTop; tmp; tmp = tmp->mNext) {
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNode)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mChildren)
}
}
//----------------------------------------------------------------------
@ -187,29 +177,10 @@ XULContentSinkImpl::~XULContentSinkImpl()
//----------------------------------------------------------------------
// nsISupports interface
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(XULContentSinkImpl)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mNodeInfoManager)
tmp->mContextStack.Clear();
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPrototype)
NS_IF_RELEASE(tmp->mParser);
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(XULContentSinkImpl)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNodeInfoManager)
tmp->mContextStack.Traverse(cb);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPrototype)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_RAWPTR(mParser)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(XULContentSinkImpl)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXMLContentSink)
NS_INTERFACE_MAP_ENTRY(nsIXMLContentSink)
NS_INTERFACE_MAP_ENTRY(nsIExpatSink)
NS_INTERFACE_MAP_ENTRY(nsIContentSink)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(XULContentSinkImpl)
NS_IMPL_CYCLE_COLLECTING_RELEASE(XULContentSinkImpl)
NS_IMPL_ISUPPORTS3(XULContentSinkImpl,
nsIXMLContentSink,
nsIContentSink,
nsIExpatSink)
//----------------------------------------------------------------------
// nsIContentSink interface

View File

@ -29,11 +29,9 @@ public:
virtual ~XULContentSinkImpl();
// nsISupports
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_ISUPPORTS
NS_DECL_NSIEXPATSINK
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(XULContentSinkImpl, nsIXMLContentSink)
// nsIContentSink
NS_IMETHOD WillParse(void) { return NS_OK; }
NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
@ -130,8 +128,6 @@ protected:
nsresult GetTopChildren(nsPrototypeArray** aChildren);
void Clear();
void Traverse(nsCycleCollectionTraversalCallback& aCallback);
};
friend class ContextStack;

View File

@ -361,6 +361,8 @@ WrapperFactory::Rewrap(JSContext *cx, JSObject *existing, JSObject *obj,
Wrapper *wrapper;
CompartmentPrivate *targetdata = EnsureCompartmentPrivate(target);
bool canAccessNAC = targetIsChrome ||
(targetSubsumesOrigin && nsContentUtils::IsCallerXBL());
//
// First, handle the special cases.
@ -381,9 +383,7 @@ WrapperFactory::Rewrap(JSContext *cx, JSObject *existing, JSObject *obj,
} else if (IsComponentsObject(obj) && !AccessCheck::isChrome(target)) {
wrapper = &FilteringWrapper<CrossCompartmentSecurityWrapper,
ComponentsObjectPolicy>::singleton;
} else if (AccessCheck::needsSystemOnlyWrapper(obj) &&
!(targetIsChrome || (targetSubsumesOrigin && nsContentUtils::IsCallerXBL())))
{
} else if (AccessCheck::needsSystemOnlyWrapper(obj) && !canAccessNAC) {
wrapper = &FilteringWrapper<CrossCompartmentSecurityWrapper,
OnlyIfSubjectIsSystem>::singleton;
}

View File

@ -142,10 +142,7 @@ skip-if(B2G) == use-01-extref.svg pass.svg
== filter-basic-03.svg pass.svg
== filter-bounds-01.svg pass.svg
== filter-bounds-02.svg pass.svg
# This pref is normally on by default, but we turn it off in reftest runs to
# disable an unnecessary security-check. This reftest is actually testing that
# the security check works, though, so it needs the pref to be turned on:
fails-if(Android||B2G) pref(security.fileuri.strict_origin_policy,true) == filter-extref-differentOrigin-01.svg pass.svg # Bug 695385
fails-if(Android||B2G) == filter-extref-differentOrigin-01.svg pass.svg # Bug 695385
== filter-foreignObject-01.svg pass.svg
== filter-in-mask-01.svg pass.svg
skip-if(B2G) == filter-invalidation-01.svg pass.svg

View File

@ -97,9 +97,6 @@ RefTestCmdLineHandler.prototype =
branch.setIntPref("urlclassifier.updateinterval", 172800);
// Disable high-quality downscaling, since it makes reftests more difficult.
branch.setBoolPref("image.high_quality_downscaling.enabled", false);
// Checking whether two files are the same is slow on Windows.
// Setting this pref makes tests run much faster there.
branch.setBoolPref("security.fileuri.strict_origin_policy", false);
var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(nsIWindowWatcher);