bug 517977: require actor impls to override AllocPFoo/DeallocPFoo instead of PFooConstructor/PFooDestructor
This commit is contained in:
@@ -76,7 +76,7 @@ ContentProcessChild::Init(MessageLoop* aIOLoop, IPC::Channel* aChannel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PIFrameEmbeddingChild*
|
PIFrameEmbeddingChild*
|
||||||
ContentProcessChild::PIFrameEmbeddingConstructor(const MagicWindowHandle& hwnd)
|
ContentProcessChild::AllocPIFrameEmbedding(const MagicWindowHandle& hwnd)
|
||||||
{
|
{
|
||||||
PIFrameEmbeddingChild* iframe = new TabChild(hwnd);
|
PIFrameEmbeddingChild* iframe = new TabChild(hwnd);
|
||||||
if (iframe && mIFrames.AppendElement(iframe)) {
|
if (iframe && mIFrames.AppendElement(iframe)) {
|
||||||
@@ -87,14 +87,14 @@ ContentProcessChild::PIFrameEmbeddingConstructor(const MagicWindowHandle& hwnd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentProcessChild::PIFrameEmbeddingDestructor(PIFrameEmbeddingChild* iframe)
|
ContentProcessChild::DeallocPIFrameEmbedding(PIFrameEmbeddingChild* iframe)
|
||||||
{
|
{
|
||||||
mIFrames.RemoveElement(iframe);
|
mIFrames.RemoveElement(iframe);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PTestShellChild*
|
PTestShellChild*
|
||||||
ContentProcessChild::PTestShellConstructor()
|
ContentProcessChild::AllocPTestShell()
|
||||||
{
|
{
|
||||||
PTestShellChild* testshell = new TestShellChild();
|
PTestShellChild* testshell = new TestShellChild();
|
||||||
if (testshell && mTestShells.AppendElement(testshell)) {
|
if (testshell && mTestShells.AppendElement(testshell)) {
|
||||||
@@ -105,20 +105,20 @@ ContentProcessChild::PTestShellConstructor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentProcessChild::PTestShellDestructor(PTestShellChild* shell)
|
ContentProcessChild::DeallocPTestShell(PTestShellChild* shell)
|
||||||
{
|
{
|
||||||
mTestShells.RemoveElement(shell);
|
mTestShells.RemoveElement(shell);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PNeckoChild*
|
PNeckoChild*
|
||||||
ContentProcessChild::PNeckoConstructor()
|
ContentProcessChild::AllocPNecko()
|
||||||
{
|
{
|
||||||
return new NeckoChild();
|
return new NeckoChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentProcessChild::PNeckoDestructor(PNeckoChild* necko)
|
ContentProcessChild::DeallocPNecko(PNeckoChild* necko)
|
||||||
{
|
{
|
||||||
delete necko;
|
delete necko;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -60,15 +60,15 @@ public:
|
|||||||
return sSingleton;
|
return sSingleton;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual PIFrameEmbeddingChild* PIFrameEmbeddingConstructor(
|
virtual PIFrameEmbeddingChild* AllocPIFrameEmbedding(
|
||||||
const MagicWindowHandle& hwnd);
|
const MagicWindowHandle& hwnd);
|
||||||
virtual bool PIFrameEmbeddingDestructor(PIFrameEmbeddingChild*);
|
virtual bool DeallocPIFrameEmbedding(PIFrameEmbeddingChild*);
|
||||||
|
|
||||||
virtual PTestShellChild* PTestShellConstructor();
|
virtual PTestShellChild* AllocPTestShell();
|
||||||
virtual bool PTestShellDestructor(PTestShellChild*);
|
virtual bool DeallocPTestShell(PTestShellChild*);
|
||||||
|
|
||||||
virtual PNeckoChild* PNeckoConstructor();
|
virtual PNeckoChild* AllocPNecko();
|
||||||
virtual bool PNeckoDestructor(PNeckoChild*);
|
virtual bool DeallocPNecko(PNeckoChild*);
|
||||||
|
|
||||||
void Quit();
|
void Quit();
|
||||||
virtual bool RecvQuit();
|
virtual bool RecvQuit();
|
||||||
|
|||||||
@@ -143,40 +143,40 @@ ContentProcessParent::OnWaitableEventSignaled(base::WaitableEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PIFrameEmbeddingParent*
|
PIFrameEmbeddingParent*
|
||||||
ContentProcessParent::PIFrameEmbeddingConstructor(
|
ContentProcessParent::AllocPIFrameEmbedding(
|
||||||
const MagicWindowHandle& parentWidget)
|
const MagicWindowHandle& parentWidget)
|
||||||
{
|
{
|
||||||
return new TabParent();
|
return new TabParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentProcessParent::PIFrameEmbeddingDestructor(PIFrameEmbeddingParent* frame)
|
ContentProcessParent::DeallocPIFrameEmbedding(PIFrameEmbeddingParent* frame)
|
||||||
{
|
{
|
||||||
delete frame;
|
delete frame;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PTestShellParent*
|
PTestShellParent*
|
||||||
ContentProcessParent::PTestShellConstructor()
|
ContentProcessParent::AllocPTestShell()
|
||||||
{
|
{
|
||||||
return new TestShellParent();
|
return new TestShellParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentProcessParent::PTestShellDestructor(PTestShellParent* shell)
|
ContentProcessParent::DeallocPTestShell(PTestShellParent* shell)
|
||||||
{
|
{
|
||||||
delete shell;
|
delete shell;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PNeckoParent*
|
PNeckoParent*
|
||||||
ContentProcessParent::PNeckoConstructor()
|
ContentProcessParent::AllocPNecko()
|
||||||
{
|
{
|
||||||
return new NeckoParent();
|
return new NeckoParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentProcessParent::PNeckoDestructor(PNeckoParent* necko)
|
ContentProcessParent::DeallocPNecko(PNeckoParent* necko)
|
||||||
{
|
{
|
||||||
delete necko;
|
delete necko;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -91,15 +91,15 @@ private:
|
|||||||
ContentProcessParent();
|
ContentProcessParent();
|
||||||
virtual ~ContentProcessParent();
|
virtual ~ContentProcessParent();
|
||||||
|
|
||||||
virtual PIFrameEmbeddingParent* PIFrameEmbeddingConstructor(
|
virtual PIFrameEmbeddingParent* AllocPIFrameEmbedding(
|
||||||
const MagicWindowHandle& parentWidget);
|
const MagicWindowHandle& parentWidget);
|
||||||
virtual bool PIFrameEmbeddingDestructor(PIFrameEmbeddingParent* frame);
|
virtual bool DeallocPIFrameEmbedding(PIFrameEmbeddingParent* frame);
|
||||||
|
|
||||||
virtual PTestShellParent* PTestShellConstructor();
|
virtual PTestShellParent* AllocPTestShell();
|
||||||
virtual bool PTestShellDestructor(PTestShellParent* shell);
|
virtual bool DeallocPTestShell(PTestShellParent* shell);
|
||||||
|
|
||||||
virtual PNeckoParent* PNeckoConstructor();
|
virtual PNeckoParent* AllocPNecko();
|
||||||
virtual bool PNeckoDestructor(PNeckoParent* necko);
|
virtual bool DeallocPNecko(PNeckoParent* necko);
|
||||||
|
|
||||||
mozilla::Monitor mMonitor;
|
mozilla::Monitor mMonitor;
|
||||||
|
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ PluginInstanceChild::PluginWindowProc(HWND hWnd,
|
|||||||
#endif // OS_WIN
|
#endif // OS_WIN
|
||||||
|
|
||||||
PPluginScriptableObjectChild*
|
PPluginScriptableObjectChild*
|
||||||
PluginInstanceChild::PPluginScriptableObjectConstructor()
|
PluginInstanceChild::AllocPPluginScriptableObject()
|
||||||
{
|
{
|
||||||
nsAutoPtr<PluginScriptableObjectChild>* object =
|
nsAutoPtr<PluginScriptableObjectChild>* object =
|
||||||
mScriptableObjects.AppendElement();
|
mScriptableObjects.AppendElement();
|
||||||
@@ -435,7 +435,7 @@ PluginInstanceChild::PPluginScriptableObjectConstructor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginInstanceChild::PPluginScriptableObjectDestructor(PPluginScriptableObjectChild* aObject)
|
PluginInstanceChild::DeallocPPluginScriptableObject(PPluginScriptableObjectChild* aObject)
|
||||||
{
|
{
|
||||||
PluginScriptableObjectChild* object =
|
PluginScriptableObjectChild* object =
|
||||||
reinterpret_cast<PluginScriptableObjectChild*>(aObject);
|
reinterpret_cast<PluginScriptableObjectChild*>(aObject);
|
||||||
@@ -451,7 +451,7 @@ PluginInstanceChild::PPluginScriptableObjectDestructor(PPluginScriptableObjectCh
|
|||||||
}
|
}
|
||||||
|
|
||||||
PBrowserStreamChild*
|
PBrowserStreamChild*
|
||||||
PluginInstanceChild::PBrowserStreamConstructor(const nsCString& url,
|
PluginInstanceChild::AllocPBrowserStream(const nsCString& url,
|
||||||
const uint32_t& length,
|
const uint32_t& length,
|
||||||
const uint32_t& lastmodified,
|
const uint32_t& lastmodified,
|
||||||
const PStreamNotifyChild* notifyData,
|
const PStreamNotifyChild* notifyData,
|
||||||
@@ -476,7 +476,7 @@ PluginInstanceChild::AnswerPBrowserStreamDestructor(PBrowserStreamChild* stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginInstanceChild::PBrowserStreamDestructor(PBrowserStreamChild* stream,
|
PluginInstanceChild::DeallocPBrowserStream(PBrowserStreamChild* stream,
|
||||||
const NPError& reason,
|
const NPError& reason,
|
||||||
const bool& artificial)
|
const bool& artificial)
|
||||||
{
|
{
|
||||||
@@ -485,7 +485,7 @@ PluginInstanceChild::PBrowserStreamDestructor(PBrowserStreamChild* stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PPluginStreamChild*
|
PPluginStreamChild*
|
||||||
PluginInstanceChild::PPluginStreamConstructor(const nsCString& mimeType,
|
PluginInstanceChild::AllocPPluginStream(const nsCString& mimeType,
|
||||||
const nsCString& target,
|
const nsCString& target,
|
||||||
NPError* result)
|
NPError* result)
|
||||||
{
|
{
|
||||||
@@ -505,7 +505,7 @@ PluginInstanceChild::AnswerPPluginStreamDestructor(PPluginStreamChild* stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginInstanceChild::PPluginStreamDestructor(PPluginStreamChild* stream,
|
PluginInstanceChild::DeallocPPluginStream(PPluginStreamChild* stream,
|
||||||
const NPError& reason,
|
const NPError& reason,
|
||||||
const bool& artificial)
|
const bool& artificial)
|
||||||
{
|
{
|
||||||
@@ -514,7 +514,7 @@ PluginInstanceChild::PPluginStreamDestructor(PPluginStreamChild* stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PStreamNotifyChild*
|
PStreamNotifyChild*
|
||||||
PluginInstanceChild::PStreamNotifyConstructor(const nsCString& url,
|
PluginInstanceChild::AllocPStreamNotify(const nsCString& url,
|
||||||
const nsCString& target,
|
const nsCString& target,
|
||||||
const bool& post,
|
const bool& post,
|
||||||
const nsCString& buffer,
|
const nsCString& buffer,
|
||||||
@@ -526,7 +526,7 @@ PluginInstanceChild::PStreamNotifyConstructor(const nsCString& url,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginInstanceChild::PStreamNotifyDestructor(PStreamNotifyChild* notifyData,
|
PluginInstanceChild::DeallocPStreamNotify(PStreamNotifyChild* notifyData,
|
||||||
const NPReason& reason)
|
const NPReason& reason)
|
||||||
{
|
{
|
||||||
StreamNotifyChild* sn = static_cast<StreamNotifyChild*>(notifyData);
|
StreamNotifyChild* sn = static_cast<StreamNotifyChild*>(notifyData);
|
||||||
|
|||||||
@@ -78,13 +78,13 @@ protected:
|
|||||||
AnswerNPP_HandleEvent(const NPEvent& event, int16_t* handled);
|
AnswerNPP_HandleEvent(const NPEvent& event, int16_t* handled);
|
||||||
|
|
||||||
virtual PPluginScriptableObjectChild*
|
virtual PPluginScriptableObjectChild*
|
||||||
PPluginScriptableObjectConstructor();
|
AllocPPluginScriptableObject();
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PPluginScriptableObjectDestructor(PPluginScriptableObjectChild* aObject);
|
DeallocPPluginScriptableObject(PPluginScriptableObjectChild* aObject);
|
||||||
|
|
||||||
virtual PBrowserStreamChild*
|
virtual PBrowserStreamChild*
|
||||||
PBrowserStreamConstructor(const nsCString& url,
|
AllocPBrowserStream(const nsCString& url,
|
||||||
const uint32_t& length,
|
const uint32_t& length,
|
||||||
const uint32_t& lastmodified,
|
const uint32_t& lastmodified,
|
||||||
const PStreamNotifyChild* notifyData,
|
const PStreamNotifyChild* notifyData,
|
||||||
@@ -100,12 +100,12 @@ protected:
|
|||||||
const bool& artificial);
|
const bool& artificial);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PBrowserStreamDestructor(PBrowserStreamChild* stream,
|
DeallocPBrowserStream(PBrowserStreamChild* stream,
|
||||||
const NPError& reason,
|
const NPError& reason,
|
||||||
const bool& artificial);
|
const bool& artificial);
|
||||||
|
|
||||||
virtual PPluginStreamChild*
|
virtual PPluginStreamChild*
|
||||||
PPluginStreamConstructor(const nsCString& mimeType,
|
AllocPPluginStream(const nsCString& mimeType,
|
||||||
const nsCString& target,
|
const nsCString& target,
|
||||||
NPError* result);
|
NPError* result);
|
||||||
|
|
||||||
@@ -115,18 +115,18 @@ protected:
|
|||||||
const bool& artificial);
|
const bool& artificial);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PPluginStreamDestructor(PPluginStreamChild* stream,
|
DeallocPPluginStream(PPluginStreamChild* stream,
|
||||||
const NPReason& reason,
|
const NPReason& reason,
|
||||||
const bool& artificial);
|
const bool& artificial);
|
||||||
|
|
||||||
virtual PStreamNotifyChild*
|
virtual PStreamNotifyChild*
|
||||||
PStreamNotifyConstructor(const nsCString& url, const nsCString& target,
|
AllocPStreamNotify(const nsCString& url, const nsCString& target,
|
||||||
const bool& post, const nsCString& buffer,
|
const bool& post, const nsCString& buffer,
|
||||||
const bool& file,
|
const bool& file,
|
||||||
NPError* result);
|
NPError* result);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PStreamNotifyDestructor(PStreamNotifyChild* notifyData,
|
DeallocPStreamNotify(PStreamNotifyChild* notifyData,
|
||||||
const NPReason& reason);
|
const NPReason& reason);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace mozilla {
|
|||||||
namespace plugins {
|
namespace plugins {
|
||||||
|
|
||||||
PBrowserStreamParent*
|
PBrowserStreamParent*
|
||||||
PluginInstanceParent::PBrowserStreamConstructor(const nsCString& url,
|
PluginInstanceParent::AllocPBrowserStream(const nsCString& url,
|
||||||
const uint32_t& length,
|
const uint32_t& length,
|
||||||
const uint32_t& lastmodified,
|
const uint32_t& lastmodified,
|
||||||
const PStreamNotifyParent* notifyData,
|
const PStreamNotifyParent* notifyData,
|
||||||
@@ -71,7 +71,7 @@ PluginInstanceParent::AnswerPBrowserStreamDestructor(PBrowserStreamParent* strea
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginInstanceParent::PBrowserStreamDestructor(PBrowserStreamParent* stream,
|
PluginInstanceParent::DeallocPBrowserStream(PBrowserStreamParent* stream,
|
||||||
const NPError& reason,
|
const NPError& reason,
|
||||||
const bool& artificial)
|
const bool& artificial)
|
||||||
{
|
{
|
||||||
@@ -80,7 +80,7 @@ PluginInstanceParent::PBrowserStreamDestructor(PBrowserStreamParent* stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PPluginStreamParent*
|
PPluginStreamParent*
|
||||||
PluginInstanceParent::PPluginStreamConstructor(const nsCString& mimeType,
|
PluginInstanceParent::AllocPPluginStream(const nsCString& mimeType,
|
||||||
const nsCString& target,
|
const nsCString& target,
|
||||||
NPError* result)
|
NPError* result)
|
||||||
{
|
{
|
||||||
@@ -88,7 +88,7 @@ PluginInstanceParent::PPluginStreamConstructor(const nsCString& mimeType,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginInstanceParent::PPluginStreamDestructor(PPluginStreamParent* stream,
|
PluginInstanceParent::DeallocPPluginStream(PPluginStreamParent* stream,
|
||||||
const NPError& reason,
|
const NPError& reason,
|
||||||
const bool& artificial)
|
const bool& artificial)
|
||||||
{
|
{
|
||||||
@@ -176,7 +176,7 @@ PluginInstanceParent::AnswerNPN_PostURL(const nsCString& url,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PStreamNotifyParent*
|
PStreamNotifyParent*
|
||||||
PluginInstanceParent::PStreamNotifyConstructor(const nsCString& url,
|
PluginInstanceParent::AllocPStreamNotify(const nsCString& url,
|
||||||
const nsCString& target,
|
const nsCString& target,
|
||||||
const bool& post,
|
const bool& post,
|
||||||
const nsCString& buffer,
|
const nsCString& buffer,
|
||||||
@@ -203,7 +203,7 @@ PluginInstanceParent::PStreamNotifyConstructor(const nsCString& url,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginInstanceParent::PStreamNotifyDestructor(PStreamNotifyParent* notifyData,
|
PluginInstanceParent::DeallocPStreamNotify(PStreamNotifyParent* notifyData,
|
||||||
const NPReason& reason)
|
const NPReason& reason)
|
||||||
{
|
{
|
||||||
delete notifyData;
|
delete notifyData;
|
||||||
@@ -313,13 +313,13 @@ PluginInstanceParent::NPP_DestroyStream(NPStream* stream, NPReason reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PPluginScriptableObjectParent*
|
PPluginScriptableObjectParent*
|
||||||
PluginInstanceParent::PPluginScriptableObjectConstructor()
|
PluginInstanceParent::AllocPPluginScriptableObject()
|
||||||
{
|
{
|
||||||
return new PluginScriptableObjectParent();
|
return new PluginScriptableObjectParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginInstanceParent::PPluginScriptableObjectDestructor(PPluginScriptableObjectParent* aObject)
|
PluginInstanceParent::DeallocPPluginScriptableObject(PPluginScriptableObjectParent* aObject)
|
||||||
{
|
{
|
||||||
delete aObject;
|
delete aObject;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -71,13 +71,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual PPluginScriptableObjectParent*
|
virtual PPluginScriptableObjectParent*
|
||||||
PPluginScriptableObjectConstructor();
|
AllocPPluginScriptableObject();
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PPluginScriptableObjectDestructor(PPluginScriptableObjectParent* aObject);
|
DeallocPPluginScriptableObject(PPluginScriptableObjectParent* aObject);
|
||||||
|
|
||||||
virtual PBrowserStreamParent*
|
virtual PBrowserStreamParent*
|
||||||
PBrowserStreamConstructor(const nsCString& url,
|
AllocPBrowserStream(const nsCString& url,
|
||||||
const uint32_t& length,
|
const uint32_t& length,
|
||||||
const uint32_t& lastmodified,
|
const uint32_t& lastmodified,
|
||||||
const PStreamNotifyParent* notifyData,
|
const PStreamNotifyParent* notifyData,
|
||||||
@@ -93,17 +93,17 @@ public:
|
|||||||
const bool& artificial);
|
const bool& artificial);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PBrowserStreamDestructor(PBrowserStreamParent* stream,
|
DeallocPBrowserStream(PBrowserStreamParent* stream,
|
||||||
const NPError& reason,
|
const NPError& reason,
|
||||||
const bool& artificial);
|
const bool& artificial);
|
||||||
|
|
||||||
virtual PPluginStreamParent*
|
virtual PPluginStreamParent*
|
||||||
PPluginStreamConstructor(const nsCString& mimeType,
|
AllocPPluginStream(const nsCString& mimeType,
|
||||||
const nsCString& target,
|
const nsCString& target,
|
||||||
NPError* result);
|
NPError* result);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PPluginStreamDestructor(PPluginStreamParent* stream,
|
DeallocPPluginStream(PPluginStreamParent* stream,
|
||||||
const NPError& reason,
|
const NPError& reason,
|
||||||
const bool& artificial);
|
const bool& artificial);
|
||||||
|
|
||||||
@@ -132,13 +132,13 @@ public:
|
|||||||
NPError* result);
|
NPError* result);
|
||||||
|
|
||||||
virtual PStreamNotifyParent*
|
virtual PStreamNotifyParent*
|
||||||
PStreamNotifyConstructor(const nsCString& url, const nsCString& target,
|
AllocPStreamNotify(const nsCString& url, const nsCString& target,
|
||||||
const bool& post, const nsCString& buffer,
|
const bool& post, const nsCString& buffer,
|
||||||
const bool& file,
|
const bool& file,
|
||||||
NPError* result);
|
NPError* result);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PStreamNotifyDestructor(PStreamNotifyParent* notifyData,
|
DeallocPStreamNotify(PStreamNotifyParent* notifyData,
|
||||||
const NPReason& reason);
|
const NPReason& reason);
|
||||||
|
|
||||||
NPError NPP_SetWindow(NPWindow* aWindow);
|
NPError NPP_SetWindow(NPWindow* aWindow);
|
||||||
|
|||||||
@@ -986,7 +986,7 @@ PluginModuleChild::AnswerNP_Initialize(NPError* _retval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PPluginInstanceChild*
|
PPluginInstanceChild*
|
||||||
PluginModuleChild::PPluginInstanceConstructor(const nsCString& aMimeType,
|
PluginModuleChild::AllocPPluginInstance(const nsCString& aMimeType,
|
||||||
const uint16_t& aMode,
|
const uint16_t& aMode,
|
||||||
const nsTArray<nsCString>& aNames,
|
const nsTArray<nsCString>& aNames,
|
||||||
const nsTArray<nsCString>& aValues,
|
const nsTArray<nsCString>& aValues,
|
||||||
@@ -1054,7 +1054,7 @@ PluginModuleChild::AnswerPPluginInstanceConstructor(PPluginInstanceChild* aActor
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginModuleChild::PPluginInstanceDestructor(PPluginInstanceChild* actor,
|
PluginModuleChild::DeallocPPluginInstance(PPluginInstanceChild* actor,
|
||||||
NPError* rv)
|
NPError* rv)
|
||||||
{
|
{
|
||||||
_MOZ_LOG(__FUNCTION__);
|
_MOZ_LOG(__FUNCTION__);
|
||||||
|
|||||||
@@ -102,14 +102,14 @@ protected:
|
|||||||
virtual bool AnswerNP_Initialize(NPError* rv);
|
virtual bool AnswerNP_Initialize(NPError* rv);
|
||||||
|
|
||||||
virtual PPluginInstanceChild*
|
virtual PPluginInstanceChild*
|
||||||
PPluginInstanceConstructor(const nsCString& aMimeType,
|
AllocPPluginInstance(const nsCString& aMimeType,
|
||||||
const uint16_t& aMode,
|
const uint16_t& aMode,
|
||||||
const nsTArray<nsCString>& aNames,
|
const nsTArray<nsCString>& aNames,
|
||||||
const nsTArray<nsCString>& aValues,
|
const nsTArray<nsCString>& aValues,
|
||||||
NPError* rv);
|
NPError* rv);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PPluginInstanceDestructor(PPluginInstanceChild* aActor,
|
DeallocPPluginInstance(PPluginInstanceChild* aActor,
|
||||||
NPError* rv);
|
NPError* rv);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ PluginModuleParent::~PluginModuleParent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PPluginInstanceParent*
|
PPluginInstanceParent*
|
||||||
PluginModuleParent::PPluginInstanceConstructor(const nsCString& aMimeType,
|
PluginModuleParent::AllocPPluginInstance(const nsCString& aMimeType,
|
||||||
const uint16_t& aMode,
|
const uint16_t& aMode,
|
||||||
const nsTArray<nsCString>& aNames,
|
const nsTArray<nsCString>& aNames,
|
||||||
const nsTArray<nsCString>& aValues,
|
const nsTArray<nsCString>& aValues,
|
||||||
@@ -97,7 +97,7 @@ PluginModuleParent::PPluginInstanceConstructor(const nsCString& aMimeType,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginModuleParent::PPluginInstanceDestructor(PPluginInstanceParent* aActor,
|
PluginModuleParent::DeallocPPluginInstance(PPluginInstanceParent* aActor,
|
||||||
NPError* _retval)
|
NPError* _retval)
|
||||||
{
|
{
|
||||||
_MOZ_LOG(__FUNCTION__);
|
_MOZ_LOG(__FUNCTION__);
|
||||||
|
|||||||
@@ -84,14 +84,14 @@ private:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
PPluginInstanceParent*
|
PPluginInstanceParent*
|
||||||
PPluginInstanceConstructor(const nsCString& aMimeType,
|
AllocPPluginInstance(const nsCString& aMimeType,
|
||||||
const uint16_t& aMode,
|
const uint16_t& aMode,
|
||||||
const nsTArray<nsCString>& aNames,
|
const nsTArray<nsCString>& aNames,
|
||||||
const nsTArray<nsCString>& aValues,
|
const nsTArray<nsCString>& aValues,
|
||||||
NPError* rv);
|
NPError* rv);
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
PPluginInstanceDestructor(PPluginInstanceParent* aActor,
|
DeallocPPluginInstance(PPluginInstanceParent* aActor,
|
||||||
NPError* _retval);
|
NPError* _retval);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -839,6 +839,13 @@ class GenerateProtocolHeader(Visitor):
|
|||||||
md._cxx.replyid = 'Reply_%s'% (md.decl.progname)
|
md._cxx.replyid = 'Reply_%s'% (md.decl.progname)
|
||||||
md._cxx.nsreplyid = '%s::%s'% (self.pname, md._cxx.replyid)
|
md._cxx.nsreplyid = '%s::%s'% (self.pname, md._cxx.replyid)
|
||||||
|
|
||||||
|
# the names of the factory ctor/dtor the manager (if it exists)
|
||||||
|
# will implement
|
||||||
|
cdtype = md.decl.type.constructedType()
|
||||||
|
if cdtype is not None:
|
||||||
|
md._cxx.alloc = 'Alloc'+ cdtype.name()
|
||||||
|
md._cxx.dealloc = 'Dealloc'+ cdtype.name()
|
||||||
|
|
||||||
|
|
||||||
def visitTransitionStmt(self, ts):
|
def visitTransitionStmt(self, ts):
|
||||||
ts.state.decl._cxxname = 'State_%s__ID'% (ts.state.decl.progname)
|
ts.state.decl._cxxname = 'State_%s__ID'% (ts.state.decl.progname)
|
||||||
@@ -1224,6 +1231,14 @@ class GenerateProtocolActorHeader(Visitor):
|
|||||||
self.myside),
|
self.myside),
|
||||||
ptr=1)
|
ptr=1)
|
||||||
meth = deepcopy(md._cxx.method)
|
meth = deepcopy(md._cxx.method)
|
||||||
|
|
||||||
|
if md.decl.type.isCtor():
|
||||||
|
meth.name = md._cxx.alloc
|
||||||
|
elif md.decl.type.isDtor():
|
||||||
|
meth.name = md._cxx.dealloc
|
||||||
|
else:
|
||||||
|
assert 0
|
||||||
|
|
||||||
for param in meth.params:
|
for param in meth.params:
|
||||||
if param.type.actor:
|
if param.type.actor:
|
||||||
param.type.name = _actorName(param.type.name,
|
param.type.name = _actorName(param.type.name,
|
||||||
@@ -1558,7 +1573,6 @@ class GenerateProtocolActorHeader(Visitor):
|
|||||||
block.addstmt(cxx.CppDirective('endif', '// ifdef DEBUG'))
|
block.addstmt(cxx.CppDirective('endif', '// ifdef DEBUG'))
|
||||||
block.addstmt(cxx.Whitespace.NL)
|
block.addstmt(cxx.Whitespace.NL)
|
||||||
|
|
||||||
|
|
||||||
if self.sendsMessage(md):
|
if self.sendsMessage(md):
|
||||||
pfx = None
|
pfx = None
|
||||||
if md.decl.type.isRpc():
|
if md.decl.type.isRpc():
|
||||||
@@ -1606,7 +1620,7 @@ class GenerateProtocolActorHeader(Visitor):
|
|||||||
#
|
#
|
||||||
|
|
||||||
# here |impl| is the first ctor interface above
|
# here |impl| is the first ctor interface above
|
||||||
callctor = cxx.ExprCall(cxx.ExprVar(md._cxx.method.name),
|
callctor = cxx.ExprCall(cxx.ExprVar(md._cxx.alloc),
|
||||||
[ cxx.ExprVar(p.name) for
|
[ cxx.ExprVar(p.name) for
|
||||||
p in md._cxx.method.params ])
|
p in md._cxx.method.params ])
|
||||||
impl.addstmt(cxx.StmtReturn(
|
impl.addstmt(cxx.StmtReturn(
|
||||||
@@ -2005,7 +2019,7 @@ class GenerateProtocolActorHeader(Visitor):
|
|||||||
cxx.ExprAssn(objid, cxx.ExprLiteral.ZERO)))
|
cxx.ExprAssn(objid, cxx.ExprLiteral.ZERO)))
|
||||||
|
|
||||||
calldtor = cxx.ExprCall(
|
calldtor = cxx.ExprCall(
|
||||||
cxx.ExprVar(md._cxx.method.name),
|
cxx.ExprVar(md._cxx.dealloc),
|
||||||
([ objvar ]
|
([ objvar ]
|
||||||
+ [ cxx.ExprVar(p.name) for p in md._cxx.params ]
|
+ [ cxx.ExprVar(p.name) for p in md._cxx.params ]
|
||||||
+ [ cxx.ExprVar(r.name) for r in md._cxx.returns ]))
|
+ [ cxx.ExprVar(r.name) for r in md._cxx.returns ]))
|
||||||
@@ -2162,7 +2176,7 @@ class GenerateProtocolActorHeader(Visitor):
|
|||||||
block.addstmt(cxx.StmtExpr(cxx.ExprAssn(
|
block.addstmt(cxx.StmtExpr(cxx.ExprAssn(
|
||||||
objvar,
|
objvar,
|
||||||
cxx.ExprCall(
|
cxx.ExprCall(
|
||||||
cxx.ExprVar(md._cxx.method.name),
|
cxx.ExprVar(md._cxx.alloc),
|
||||||
([ cxx.ExprVar(p.name) for
|
([ cxx.ExprVar(p.name) for
|
||||||
p in md._cxx.params ]
|
p in md._cxx.params ]
|
||||||
+ [ cxx.ExprAddrOf(cxx.ExprVar(r.name)) for
|
+ [ cxx.ExprAddrOf(cxx.ExprVar(r.name)) for
|
||||||
@@ -2226,7 +2240,7 @@ class GenerateProtocolActorHeader(Visitor):
|
|||||||
cxx.ExprLiteral.ZERO)))
|
cxx.ExprLiteral.ZERO)))
|
||||||
|
|
||||||
calldtor = cxx.ExprCall(
|
calldtor = cxx.ExprCall(
|
||||||
cxx.ExprVar(md._cxx.method.name),
|
cxx.ExprVar(md._cxx.dealloc),
|
||||||
([ objvar ]
|
([ objvar ]
|
||||||
+ [ cxx.ExprVar(p.name) for p in md._cxx.params ]
|
+ [ cxx.ExprVar(p.name) for p in md._cxx.params ]
|
||||||
+ [ cxx.ExprAddrOf(cxx.ExprVar(r.name)) for
|
+ [ cxx.ExprAddrOf(cxx.ExprVar(r.name)) for
|
||||||
|
|||||||
@@ -57,13 +57,13 @@ TestShellChild::RecvExecuteCommand(const nsString& aCommand)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PTestShellCommandChild*
|
PTestShellCommandChild*
|
||||||
TestShellChild::PTestShellCommandConstructor(const nsString& aCommand)
|
TestShellChild::AllocPTestShellCommand(const nsString& aCommand)
|
||||||
{
|
{
|
||||||
return new PTestShellCommandChild();
|
return new PTestShellCommandChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TestShellChild::PTestShellCommandDestructor(PTestShellCommandChild* aCommand,
|
TestShellChild::DeallocPTestShellCommand(PTestShellCommandChild* aCommand,
|
||||||
const nsString& aResponse)
|
const nsString& aResponse)
|
||||||
{
|
{
|
||||||
delete aCommand;
|
delete aCommand;
|
||||||
|
|||||||
@@ -57,14 +57,14 @@ public:
|
|||||||
RecvExecuteCommand(const nsString& aCommand);
|
RecvExecuteCommand(const nsString& aCommand);
|
||||||
|
|
||||||
PTestShellCommandChild*
|
PTestShellCommandChild*
|
||||||
PTestShellCommandConstructor(const nsString& aCommand);
|
AllocPTestShellCommand(const nsString& aCommand);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RecvPTestShellCommandConstructor(PTestShellCommandChild* aActor,
|
RecvPTestShellCommandConstructor(PTestShellCommandChild* aActor,
|
||||||
const nsString& aCommand);
|
const nsString& aCommand);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PTestShellCommandDestructor(PTestShellCommandChild* aCommand,
|
DeallocPTestShellCommand(PTestShellCommandChild* aCommand,
|
||||||
const nsString& aResponse);
|
const nsString& aResponse);
|
||||||
|
|
||||||
void SetXPCShell(XPCShellEnvironment* aXPCShell) {
|
void SetXPCShell(XPCShellEnvironment* aXPCShell) {
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ using mozilla::ipc::TestShellCommandParent;
|
|||||||
using mozilla::ipc::PTestShellCommandParent;
|
using mozilla::ipc::PTestShellCommandParent;
|
||||||
|
|
||||||
PTestShellCommandParent*
|
PTestShellCommandParent*
|
||||||
TestShellParent::PTestShellCommandConstructor(const nsString& aCommand)
|
TestShellParent::AllocPTestShellCommand(const nsString& aCommand)
|
||||||
{
|
{
|
||||||
return new TestShellCommandParent();
|
return new TestShellCommandParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TestShellParent::PTestShellCommandDestructor(PTestShellCommandParent* aActor,
|
TestShellParent::DeallocPTestShellCommand(PTestShellCommandParent* aActor,
|
||||||
const nsString& aResponse)
|
const nsString& aResponse)
|
||||||
{
|
{
|
||||||
delete aActor;
|
delete aActor;
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ class TestShellParent : public PTestShellParent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PTestShellCommandParent*
|
PTestShellCommandParent*
|
||||||
PTestShellCommandConstructor(const nsString& aCommand);
|
AllocPTestShellCommand(const nsString& aCommand);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PTestShellCommandDestructor(PTestShellCommandParent* aActor,
|
DeallocPTestShellCommand(PTestShellCommandParent* aActor,
|
||||||
const nsString& aResponse);
|
const nsString& aResponse);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -68,13 +68,13 @@ void NeckoChild::InitNeckoChild()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PHttpChannelChild*
|
PHttpChannelChild*
|
||||||
NeckoChild::PHttpChannelConstructor()
|
NeckoChild::AllocPHttpChannel()
|
||||||
{
|
{
|
||||||
return new HttpChannelChild();
|
return new HttpChannelChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
NeckoChild::PHttpChannelDestructor(PHttpChannelChild* channel)
|
NeckoChild::DeallocPHttpChannel(PHttpChannelChild* channel)
|
||||||
{
|
{
|
||||||
delete channel;
|
delete channel;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ public:
|
|||||||
|
|
||||||
static void InitNeckoChild();
|
static void InitNeckoChild();
|
||||||
|
|
||||||
virtual PHttpChannelChild* PHttpChannelConstructor();
|
virtual PHttpChannelChild* AllocPHttpChannel();
|
||||||
virtual bool PHttpChannelDestructor(PHttpChannelChild*);
|
virtual bool DeallocPHttpChannel(PHttpChannelChild*);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -54,13 +54,13 @@ NeckoParent::~NeckoParent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PHttpChannelParent*
|
PHttpChannelParent*
|
||||||
NeckoParent::PHttpChannelConstructor()
|
NeckoParent::AllocPHttpChannel()
|
||||||
{
|
{
|
||||||
return new HttpChannelParent();
|
return new HttpChannelParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
NeckoParent::PHttpChannelDestructor(PHttpChannelParent* channel)
|
NeckoParent::DeallocPHttpChannel(PHttpChannelParent* channel)
|
||||||
{
|
{
|
||||||
delete channel;
|
delete channel;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ public:
|
|||||||
virtual ~NeckoParent();
|
virtual ~NeckoParent();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual PHttpChannelParent* PHttpChannelConstructor();
|
virtual PHttpChannelParent* AllocPHttpChannel();
|
||||||
virtual bool PHttpChannelDestructor(PHttpChannelParent*);
|
virtual bool DeallocPHttpChannel(PHttpChannelParent*);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace net
|
} // namespace net
|
||||||
|
|||||||
Reference in New Issue
Block a user