Bug 1317597. Stop using LegacyIsCallerChromeOrNativeCode use in nsObjectLoadingContent. r=qdot
These checks date back to when we didn't have webidl bindings and could end up
exposing random XPCOM methods to the web. That doesn't happen anymore.
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -1180,18 +1180,16 @@ nsObjectLoadingContent::OnStopRequest(ns
if (aStatusCode == NS_ERROR_TRACKING_URI) {
nsCOMPtr<nsIContent> thisNode =
do_QueryInterface(static_cast<nsIObjectLoadingContent*>(this));
if (thisNode && thisNode->IsInComposedDoc()) {
thisNode->GetComposedDoc()->AddBlockedTrackingNode(thisNode);
}
}
- NS_ENSURE_TRUE(nsContentUtils::LegacyIsCallerChromeOrNativeCode(), NS_ERROR_NOT_AVAILABLE);
-
if (aRequest != mChannel) {
return NS_BINDING_ABORTED;
}
mChannel = nullptr;
if (mFinalListener) {
// This may re-enter in the case of plugin listeners
@@ -1207,18 +1205,16 @@ nsObjectLoadingContent::OnStopRequest(ns
// nsIStreamListener
NS_IMETHODIMP
nsObjectLoadingContent::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint64_t aOffset, uint32_t aCount)
{
- NS_ENSURE_TRUE(nsContentUtils::LegacyIsCallerChromeOrNativeCode(), NS_ERROR_NOT_AVAILABLE);
-
if (aRequest != mChannel) {
return NS_BINDING_ABORTED;
}
if (mFinalListener) {
// This may re-enter in the case of plugin listeners
nsCOMPtr<nsIStreamListener> listenerGrip(mFinalListener);
return listenerGrip->OnDataAvailable(aRequest, aContext, aInputStream,