mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Back out 26a015091dbc (bug 1293212) for OS X failures in /html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.html
This commit is contained in:
parent
f59d74c259
commit
d8ad3d3bc3
@ -3316,8 +3316,7 @@ nsDocShell::SetDocLoaderParent(nsDocLoader* aParent)
|
||||
{
|
||||
bool wasFrame = IsFrame();
|
||||
|
||||
nsresult rv = nsDocLoader::SetDocLoaderParent(aParent);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsDocLoader::SetDocLoaderParent(aParent);
|
||||
|
||||
nsCOMPtr<nsISupportsPriority> priorityGroup = do_QueryInterface(mLoadGroup);
|
||||
if (wasFrame != IsFrame() && priorityGroup) {
|
||||
@ -4037,8 +4036,7 @@ nsDocShell::AddChild(nsIDocShellTreeItem* aChild)
|
||||
// Make sure to remove the child from its current parent.
|
||||
nsDocLoader* childsParent = childAsDocLoader->GetParent();
|
||||
if (childsParent) {
|
||||
nsresult rv = childsParent->RemoveChildLoader(childAsDocLoader);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
childsParent->RemoveChildLoader(childAsDocLoader);
|
||||
}
|
||||
|
||||
// Make sure to clear the treeowner in case this child is a different type
|
||||
|
@ -345,8 +345,7 @@ nsDocLoader::Destroy()
|
||||
// Remove the document loader from the parent list of loaders...
|
||||
if (mParent)
|
||||
{
|
||||
nsresult rv = mParent->RemoveChildLoader(this);
|
||||
NS_WARN_IF(NS_FAILED(rv));
|
||||
mParent->RemoveChildLoader(this);
|
||||
}
|
||||
|
||||
// Release all the information about network requests...
|
||||
@ -377,8 +376,7 @@ nsDocLoader::DestroyChildren()
|
||||
if (loader) {
|
||||
// This is a safe cast, as we only put nsDocLoader objects into the
|
||||
// array
|
||||
nsresult rv = static_cast<nsDocLoader*>(loader)->SetDocLoaderParent(nullptr);
|
||||
NS_WARN_IF(NS_FAILED(rv));
|
||||
static_cast<nsDocLoader*>(loader)->SetDocLoaderParent(nullptr);
|
||||
}
|
||||
}
|
||||
mChildList.Clear();
|
||||
@ -618,7 +616,7 @@ nsresult nsDocLoader::RemoveChildLoader(nsDocLoader* aChild)
|
||||
{
|
||||
nsresult rv = mChildList.RemoveElement(aChild) ? NS_OK : NS_ERROR_FAILURE;
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = aChild->SetDocLoaderParent(nullptr);
|
||||
aChild->SetDocLoaderParent(nullptr);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
@ -627,7 +625,7 @@ nsresult nsDocLoader::AddChildLoader(nsDocLoader* aChild)
|
||||
{
|
||||
nsresult rv = mChildList.AppendElement(aChild) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = aChild->SetDocLoaderParent(this);
|
||||
aChild->SetDocLoaderParent(this);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
|
||||
nsDocLoader();
|
||||
|
||||
virtual MOZ_MUST_USE nsresult Init();
|
||||
virtual nsresult Init();
|
||||
|
||||
static already_AddRefed<nsDocLoader> GetAsDocLoader(nsISupports* aSupports);
|
||||
// Needed to deal with ambiguous inheritance from nsISupports...
|
||||
@ -67,7 +67,7 @@ public:
|
||||
}
|
||||
|
||||
// Add aDocLoader as a child to the docloader service.
|
||||
static MOZ_MUST_USE nsresult AddDocLoaderAsChildOfRoot(nsDocLoader* aDocLoader);
|
||||
static nsresult AddDocLoaderAsChildOfRoot(nsDocLoader* aDocLoader);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOCUMENTLOADER
|
||||
@ -89,10 +89,10 @@ public:
|
||||
|
||||
// Remove aChild from our childlist. This nulls out the child's mParent
|
||||
// pointer.
|
||||
MOZ_MUST_USE nsresult RemoveChildLoader(nsDocLoader *aChild);
|
||||
nsresult RemoveChildLoader(nsDocLoader *aChild);
|
||||
// Add aChild to our child list. This will set aChild's mParent pointer to
|
||||
// |this|.
|
||||
MOZ_MUST_USE nsresult AddChildLoader(nsDocLoader* aChild);
|
||||
nsresult AddChildLoader(nsDocLoader* aChild);
|
||||
nsDocLoader* GetParent() const { return mParent; }
|
||||
|
||||
struct nsListenerInfo {
|
||||
@ -112,7 +112,7 @@ public:
|
||||
protected:
|
||||
virtual ~nsDocLoader();
|
||||
|
||||
virtual MOZ_MUST_USE nsresult SetDocLoaderParent(nsDocLoader * aLoader);
|
||||
virtual nsresult SetDocLoaderParent(nsDocLoader * aLoader);
|
||||
|
||||
bool IsBusy();
|
||||
|
||||
@ -164,7 +164,7 @@ protected:
|
||||
nsIURI *aUri,
|
||||
uint32_t aFlags);
|
||||
|
||||
MOZ_MUST_USE bool RefreshAttempted(nsIWebProgress* aWebProgress,
|
||||
bool RefreshAttempted(nsIWebProgress* aWebProgress,
|
||||
nsIURI *aURI,
|
||||
int32_t aDelay,
|
||||
bool aSameURI);
|
||||
@ -187,7 +187,7 @@ protected:
|
||||
|
||||
// Inform a parent docloader that aChild is about to call its onload
|
||||
// handler.
|
||||
MOZ_MUST_USE bool ChildEnteringOnload(nsIDocumentLoader* aChild) {
|
||||
bool ChildEnteringOnload(nsIDocumentLoader* aChild) {
|
||||
// It's ok if we're already in the list -- we'll just be in there twice
|
||||
// and then the RemoveObject calls from ChildDoneWithOnload will remove
|
||||
// us.
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
* Equivalent to nsIURILoader::openChannel, but allows specifying whether the
|
||||
* channel is opened already.
|
||||
*/
|
||||
MOZ_MUST_USE nsresult OpenChannel(nsIChannel* channel,
|
||||
nsresult OpenChannel(nsIChannel* channel,
|
||||
uint32_t aFlags,
|
||||
nsIInterfaceRequestor* aWindowContext,
|
||||
bool aChannelOpen,
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
NS_DECL_NSIHANDLERSERVICE
|
||||
|
||||
ContentHandlerService();
|
||||
MOZ_MUST_USE nsresult Init();
|
||||
nsresult Init();
|
||||
static void nsIHandlerInfoToHandlerInfo(nsIHandlerInfo* aInfo, HandlerInfo* aHandlerInfo);
|
||||
|
||||
private:
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
virtual bool RecvCancel(const nsresult& aStatus) override;
|
||||
private:
|
||||
virtual ~ExternalHelperAppChild();
|
||||
MOZ_MUST_USE nsresult DivertToParent(nsIDivertableChannel *divertable, nsIRequest *request);
|
||||
nsresult DivertToParent(nsIDivertableChannel *divertable, nsIRequest *request);
|
||||
|
||||
RefPtr<nsExternalAppHandler> mHandler;
|
||||
nsresult mStatus;
|
||||
|
@ -13,14 +13,14 @@
|
||||
class nsMIMEInfoAndroid final : public nsIMIMEInfo
|
||||
{
|
||||
public:
|
||||
static MOZ_MUST_USE bool
|
||||
static bool
|
||||
GetMimeInfoForMimeType(const nsACString& aMimeType,
|
||||
nsMIMEInfoAndroid** aMimeInfo);
|
||||
static MOZ_MUST_USE bool
|
||||
static bool
|
||||
GetMimeInfoForFileExt(const nsACString& aFileExt,
|
||||
nsMIMEInfoAndroid** aMimeInfo);
|
||||
|
||||
static MOZ_MUST_USE nsresult
|
||||
static nsresult
|
||||
GetMimeInfoForURL(const nsACString &aURL, bool *found,
|
||||
nsIHandlerInfo **info);
|
||||
|
||||
@ -33,8 +33,8 @@ public:
|
||||
private:
|
||||
~nsMIMEInfoAndroid() {}
|
||||
|
||||
virtual MOZ_MUST_USE nsresult LaunchDefaultWithFile(nsIFile* aFile);
|
||||
virtual MOZ_MUST_USE nsresult LoadUriInternal(nsIURI *aURI);
|
||||
virtual nsresult LaunchDefaultWithFile(nsIFile* aFile);
|
||||
virtual nsresult LoadUriInternal(nsIURI *aURI);
|
||||
nsCOMPtr<nsIMutableArray> mHandlerApps;
|
||||
nsCString mType;
|
||||
nsTArray<nsCString> mExtensions;
|
||||
|
@ -20,7 +20,7 @@ public:
|
||||
const nsACString& aFileExt,
|
||||
bool* aFound);
|
||||
|
||||
virtual MOZ_MUST_USE nsresult
|
||||
virtual nsresult
|
||||
OSProtocolHandlerExists(const char* aScheme,
|
||||
bool* aExists);
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
const nsACString& aFileExt,
|
||||
bool* aFound);
|
||||
|
||||
virtual MOZ_MUST_USE nsresult
|
||||
virtual nsresult
|
||||
OSProtocolHandlerExists(const char* aScheme,
|
||||
bool* aExists);
|
||||
};
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
nsDecodeAppleFile();
|
||||
virtual ~nsDecodeAppleFile();
|
||||
|
||||
MOZ_MUST_USE nsresult Initialize(nsIOutputStream *output, nsIFile *file);
|
||||
nsresult Initialize(nsIOutputStream *output, nsIFile *file);
|
||||
|
||||
private:
|
||||
#define MAX_BUFFERSIZE 1024
|
||||
|
@ -16,14 +16,14 @@ class nsMIMEInfoMac : public nsMIMEInfoImpl {
|
||||
|
||||
NS_IMETHOD LaunchWithFile(nsIFile* aFile);
|
||||
protected:
|
||||
virtual MOZ_MUST_USE nsresult LoadUriInternal(nsIURI *aURI);
|
||||
virtual nsresult LoadUriInternal(nsIURI *aURI);
|
||||
#ifdef DEBUG
|
||||
virtual MOZ_MUST_USE nsresult LaunchDefaultWithFile(nsIFile* aFile) {
|
||||
virtual nsresult LaunchDefaultWithFile(nsIFile* aFile) {
|
||||
NS_NOTREACHED("do not call this method, use LaunchWithFile");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
#endif
|
||||
static MOZ_MUST_USE nsresult OpenApplicationWithURI(nsIFile *aApplication,
|
||||
static nsresult OpenApplicationWithURI(nsIFile *aApplication,
|
||||
const nsCString& aURI);
|
||||
|
||||
NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription);
|
||||
|
@ -36,9 +36,9 @@ public:
|
||||
// platformAppPath --> a platform specific path to an application that we got out of the
|
||||
// rdf data source. This can be a mac file spec, a unix path or a windows path depending on the platform
|
||||
// aFile --> an nsIFile representation of that platform application path.
|
||||
virtual MOZ_MUST_USE nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile);
|
||||
virtual nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile);
|
||||
|
||||
MOZ_MUST_USE nsresult OSProtocolHandlerExists(const char * aScheme,
|
||||
nsresult OSProtocolHandlerExists(const char * aScheme,
|
||||
bool * aHandlerExists);
|
||||
|
||||
private:
|
||||
|
@ -560,8 +560,7 @@ nsOSHelperAppService::GetProtocolHandlerInfoFromOS(const nsACString &aScheme,
|
||||
}
|
||||
|
||||
nsAutoString desc;
|
||||
rv = GetApplicationDescription(aScheme, desc);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
GetApplicationDescription(aScheme, desc);
|
||||
handlerInfo->SetDefaultDescription(desc);
|
||||
|
||||
return NS_OK;
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
* Initializes internal state. Will be called automatically when
|
||||
* this service is first instantiated.
|
||||
*/
|
||||
MOZ_MUST_USE nsresult Init();
|
||||
nsresult Init();
|
||||
|
||||
/**
|
||||
* Given a mimetype and an extension, looks up a mime info from the OS.
|
||||
|
Loading…
Reference in New Issue
Block a user