/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
NS_IMETHODIMP
DocumentChannel::AsyncOpen(nsIStreamListener* aListener) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
if (loadGroup) {
loadGroup->RemoveRequest(self, nullptr, aStatusCode);
}
}));
DeleteIPDL();
}
void DocumentChannel::DisconnectChildListeners( const nsresult& aStatus, const nsresult& aLoadGroupStatus) {
MOZ_ASSERT(NS_FAILED(aStatus));
mStatus = aLoadGroupStatus; // Make sure we remove from the load group before // setting mStatus, as existing tests expect the // status to be successful when we disconnect. if (mLoadGroup) {
mLoadGroup->RemoveRequest(this, nullptr, aStatus);
mLoadGroup = nullptr;
}
bool DocumentChannel::CanUseDocumentChannel(nsIURI* aURI) { // We want to use DocumentChannel if we're using a supported scheme. return URIUsesDocChannel(aURI);
}
NS_IMETHODIMP DocumentChannel::SetLoadFlags(nsLoadFlags aLoadFlags) {
nsLoadFlags mayChange = 0; if (mLoadInfo->GetExternalContentPolicyType() ==
ExtContentPolicy::TYPE_OBJECT) { // Setting load flags for TYPE_OBJECT is OK, so long as the channel to // parent isn't opened yet, or we're only setting the `LOAD_DOCUMENT_URI` // flag.
mayChange = mWasOpened ? LOAD_DOCUMENT_URI : ~0u;
} elseif (!mWasOpened) { // If we haven't been opened yet, allow the LoadGroup to // set cache control flags inherited from the default channel.
mayChange = nsLoadGroup::kInheritedLoadFlags;
}
// Check if we're allowed to adjust these flags. if ((mLoadFlags & ~mayChange) == (aLoadFlags & ~mayChange)) {
mLoadFlags = aLoadFlags; return NS_OK;
}
MOZ_CRASH_UNSAFE_PRINTF( "DocumentChannel::SetLoadFlags: Don't set flags after creation " "(differing flags %x != %x)",
(mLoadFlags ^ aLoadFlags) & mLoadFlags,
(mLoadFlags ^ aLoadFlags) & aLoadFlags); return NS_OK;
}
NS_IMETHODIMP DocumentChannel::SetOriginalURI(nsIURI* aOriginalURI) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::GetContentType(nsACString& aContentType) { // We may be trying to load HTML object data, and have determined that we're // going to be performing a document load. In that case, fake the "text/html" // content type for nsObjectLoadingContent. if ((mLoadFlags & nsIRequest::LOAD_HTML_OBJECT_DATA) &&
(mLoadFlags & nsIChannel::LOAD_DOCUMENT_URI)) {
aContentType = TEXT_HTML; return NS_OK;
}
NS_ERROR("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::SetContentType(const nsACString& aContentType) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::GetContentCharset(nsACString& aContentCharset) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::SetContentCharset( const nsACString& aContentCharset) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::GetContentLength(int64_t* aContentLength) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::SetContentLength(int64_t aContentLength) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::Open(nsIInputStream** aStream) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::GetContentDisposition(
uint32_t* aContentDisposition) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::SetContentDisposition(
uint32_t aContentDisposition) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::GetContentDispositionFilename(
nsAString& aContentDispositionFilename) {
MOZ_CRASH("If we get here, something will be broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::SetContentDispositionFilename( const nsAString& aContentDispositionFilename) {
MOZ_CRASH("If we get here, something will be broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::GetContentDispositionHeader(
nsACString& aContentDispositionHeader) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DocumentChannel::SetLoadInfo(nsILoadInfo* aLoadInfo) {
MOZ_CRASH("If we get here, something is broken"); return NS_ERROR_NOT_IMPLEMENTED;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.