mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 17:38:36 +00:00
Bug 1055427 - Add KillChild() method to nsIMessageManager. r=sicking
Patch originally from bug 1000313.
This commit is contained in:
parent
5089d86b4a
commit
208aa7f675
@ -405,9 +405,10 @@ interface nsIFrameScriptLoader : nsISupports
|
||||
jsval getDelayedFrameScripts();
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(ad57800b-ff21-4e2f-91d3-e68615ae8afe)]
|
||||
[scriptable, builtinclass, uuid(637e8538-4f8f-4a3d-8510-e74386233e19)]
|
||||
interface nsIProcessChecker : nsISupports
|
||||
{
|
||||
bool killChild();
|
||||
|
||||
/**
|
||||
* Return true if the "remote" process has |aPermission|. This is
|
||||
|
@ -803,6 +803,18 @@ nsFrameMessageManager::Atob(const nsAString& aAsciiString,
|
||||
|
||||
// nsIProcessChecker
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameMessageManager::KillChild(bool *aValid)
|
||||
{
|
||||
if (!mCallback) {
|
||||
*aValid = false;
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
*aValid = mCallback->KillChild();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFrameMessageManager::AssertProcessInternal(ProcessCheckerType aType,
|
||||
const nsAString& aCapability,
|
||||
|
@ -98,6 +98,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool KillChild()
|
||||
{
|
||||
// By default, does nothing.
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool BuildClonedMessageDataForParent(nsIContentParent* aParent,
|
||||
const StructuredCloneData& aData,
|
||||
|
@ -3746,6 +3746,13 @@ ContentParent::CheckAppHasStatus(unsigned short aStatus)
|
||||
return AssertAppHasStatus(this, aStatus);
|
||||
}
|
||||
|
||||
bool
|
||||
ContentParent::KillChild()
|
||||
{
|
||||
KillHard();
|
||||
return true;
|
||||
}
|
||||
|
||||
PBlobParent*
|
||||
ContentParent::SendPBlobConstructor(PBlobParent* aActor,
|
||||
const BlobConstructorParams& aParams)
|
||||
|
@ -161,6 +161,7 @@ public:
|
||||
virtual bool CheckManifestURL(const nsAString& aManifestURL) MOZ_OVERRIDE;
|
||||
virtual bool CheckAppHasPermission(const nsAString& aPermission) MOZ_OVERRIDE;
|
||||
virtual bool CheckAppHasStatus(unsigned short aStatus) MOZ_OVERRIDE;
|
||||
virtual bool KillChild() MOZ_OVERRIDE;
|
||||
|
||||
/** Notify that a tab is beginning its destruction sequence. */
|
||||
void NotifyTabDestroying(PBrowserParent* aTab);
|
||||
|
Loading…
x
Reference in New Issue
Block a user