IPDL code generation error when returning an actor type

RESOLVED FIXED

Status

()

RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: benjamin, Assigned: cjones)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
Created attachment 400850 [details] [diff] [review]
WIP patch

I'm declaring a message which returns an actor:

  rpc NPN_GetValue_NPNVWindowNPObject()
    returns (PPluginScriptableObject result);

The generated code fails to compile:

In file included from ../../../src/dom/plugins/PluginInstanceChild.h:42,
                 from ../../../src/dom/plugins/PluginInstanceChild.cpp:39:
../../ipc/ipdl/_ipdlheaders/mozilla/plugins/PPluginInstanceChild.h: In member function ‘nsresult mozilla::plugins::PPluginInstanceChild::CallNPN_GetValue_NPNVWindowNPObject(mozilla::plugins::PPluginScriptableObjectChild*)’:
../../ipc/ipdl/_ipdlheaders/mozilla/plugins/PPluginInstanceChild.h:229: error: redeclaration of ‘mozilla::ipc::ActorHandle result__ah’
../../ipc/ipdl/_ipdlheaders/mozilla/plugins/PPluginInstanceChild.h:204: error: ‘mozilla::ipc::ActorHandle result__ah’ previously declared here
../../ipc/ipdl/_ipdlheaders/mozilla/plugins/PPluginInstanceChild.h: In member function ‘nsresult mozilla::plugins::PPluginInstanceChild::CallNPN_GetValue_NPNVPluginElementNPObject(mozilla::plugins::PPluginScriptableObjectChild*)’:
../../ipc/ipdl/_ipdlheaders/mozilla/plugins/PPluginInstanceChild.h:277: error: redeclaration of ‘mozilla::ipc::ActorHandle result__ah’
../../ipc/ipdl/_ipdlheaders/mozilla/plugins/PPluginInstanceChild.h:252: error: ‘mozilla::ipc::ActorHandle result__ah’ previously declared here

In addition to the multiple declarations, I think that the signature is also wrong: it's currently 

nsresult CallNPN_GetValue_NPNVWindowNPObject(PPluginScriptableObjectChild* result)

and it seems like it should be

nsresult CallNPN_GetValue_NPNVWindowNPObject(PPluginScriptableObjectChild** result)
http://hg.mozilla.org/projects/electrolysis/rev/cb6ed6132f0e
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.