From 46ad34660e1ea32134e7f0f208f0febfc53ae856 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 19 Oct 2009 14:10:52 -0500 Subject: [PATCH] bug 523143: switch protocols using nsTArray to native IPDL arrays --- dom/plugins/PPluginModule.ipdl | 12 ++++-------- dom/plugins/PPluginScriptableObject.ipdl | 11 ++++------- ipc/test-harness/PTest.ipdl | 7 ++----- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/dom/plugins/PPluginModule.ipdl b/dom/plugins/PPluginModule.ipdl index 9f850ecfb875..1db4f46947d7 100644 --- a/dom/plugins/PPluginModule.ipdl +++ b/dom/plugins/PPluginModule.ipdl @@ -40,14 +40,10 @@ include protocol "PPluginInstance.ipdl"; include "npapi.h"; -include "nsTArray.h"; include "mozilla/plugins/PluginMessageUtils.h"; using NPError; -using nsTArray; -using nsTArray; using mozilla::ipc::NPRemoteIdentifier; -using nsTArray; namespace mozilla { namespace plugins { @@ -62,8 +58,8 @@ child: rpc PPluginInstance(nsCString aMimeType, uint16_t aMode, - nsTArray aNames, - nsTArray aValues) + nsCString[] aNames, + nsCString[] aValues) returns (NPError rv); rpc ~PPluginInstance() @@ -92,8 +88,8 @@ parent: sync NPN_IdentifierIsString(NPRemoteIdentifier aId) returns (bool aIsString); - sync NPN_GetStringIdentifiers(nsTArray aNames) - returns (nsTArray aIds); + sync NPN_GetStringIdentifiers(nsCString[] aNames) + returns (NPRemoteIdentifier[] aIds); }; } // namespace plugins diff --git a/dom/plugins/PPluginScriptableObject.ipdl b/dom/plugins/PPluginScriptableObject.ipdl index eaa74887cd15..1b5ca9876ea7 100644 --- a/dom/plugins/PPluginScriptableObject.ipdl +++ b/dom/plugins/PPluginScriptableObject.ipdl @@ -41,14 +41,11 @@ include protocol "PPluginInstance.ipdl"; include "npapi.h"; include "npruntime.h"; -include "nsTArray.h"; include "mozilla/plugins/PluginMessageUtils.h"; using mozilla::ipc::NPRemoteIdentifier; -using nsTArray; using mozilla::void_t; using mozilla::null_t; -using nsTArray; namespace mozilla { namespace plugins { @@ -80,11 +77,11 @@ both: returns (bool aHasMethod); rpc Invoke(NPRemoteIdentifier aId, - nsTArray aArgs) + Variant[] aArgs) returns (Variant aResult, bool aSuccess); - rpc InvokeDefault(nsTArray aArgs) + rpc InvokeDefault(Variant[] aArgs) returns (Variant aResult, bool aSuccess); @@ -103,10 +100,10 @@ both: returns (bool aSuccess); rpc Enumerate() - returns (nsTArray aProperties, + returns (NPRemoteIdentifier[] aProperties, bool aSuccess); - rpc Construct(nsTArray aArgs) + rpc Construct(Variant[] aArgs) returns (Variant aResult, bool aSuccess); }; diff --git a/ipc/test-harness/PTest.ipdl b/ipc/test-harness/PTest.ipdl index a81720e63627..d0e07d84a0fa 100644 --- a/ipc/test-harness/PTest.ipdl +++ b/ipc/test-harness/PTest.ipdl @@ -55,9 +55,6 @@ parent: //----------------------------------------------------------------------------- // Example solution to exercise /* -include "nsTArray.h"; -using nsTArray; - namespace mozilla { namespace test { @@ -69,12 +66,12 @@ both: parent: GetValue(nsCString key); - GetValues(nsTArray keys); + GetValues(nsCString[] keys); sync SetValue(nsCString key, nsCString val) returns (bool ok); child: TellValue(nsCString key, nsCString val); - TellValues(nsTArray keys, nsTArray vals); + TellValues(nsCString[] keys, nsCString[] vals); state START: send Ping goto START;