diff --git a/dom/base/nsContentPermissionHelper.cpp b/dom/base/nsContentPermissionHelper.cpp index 4d955b6dadf8..ca293ba64b00 100644 --- a/dom/base/nsContentPermissionHelper.cpp +++ b/dom/base/nsContentPermissionHelper.cpp @@ -474,7 +474,7 @@ RemotePermissionRequest::DoAllow(JS::HandleValue aChoices) // PContentPermissionRequestChild bool RemotePermissionRequest::Recv__delete__(const bool& aAllow, - const nsTArray& aChoices) + InfallibleTArray&& aChoices) { if (aAllow && mWindow->IsCurrentInnerWindow()) { // Use 'undefined' if no choice is provided. diff --git a/dom/base/nsContentPermissionHelper.h b/dom/base/nsContentPermissionHelper.h index 02c779c7d837..e410105e68e1 100644 --- a/dom/base/nsContentPermissionHelper.h +++ b/dom/base/nsContentPermissionHelper.h @@ -117,7 +117,7 @@ public: // It will be called when prompt dismissed. virtual bool Recv__delete__(const bool &aAllow, - const nsTArray& aChoices) MOZ_OVERRIDE; + InfallibleTArray&& aChoices) MOZ_OVERRIDE; void IPDLAddRef() { @@ -146,3 +146,4 @@ private: }; #endif // nsContentPermissionHelper_h + diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index bd3d26ac9983..0240ec1c563e 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -3036,7 +3036,7 @@ private: virtual bool RecvPBackgroundIDBTransactionConstructor( PBackgroundIDBTransactionParent* aActor, - const nsTArray& aObjectStoreNames, + InfallibleTArray&& aObjectStoreNames, const Mode& aMode) MOZ_OVERRIDE; @@ -6526,7 +6526,7 @@ Database::AllocPBackgroundIDBTransactionParent( bool Database::RecvPBackgroundIDBTransactionConstructor( PBackgroundIDBTransactionParent* aActor, - const nsTArray& aObjectStoreNames, + InfallibleTArray&& aObjectStoreNames, const Mode& aMode) { AssertIsOnBackgroundThread(); diff --git a/dom/ipc/ContentBridgeChild.cpp b/dom/ipc/ContentBridgeChild.cpp index 1bc458f25a29..b3ea951cb525 100644 --- a/dom/ipc/ContentBridgeChild.cpp +++ b/dom/ipc/ContentBridgeChild.cpp @@ -66,10 +66,10 @@ ContentBridgeChild::DeferredDestroy() bool ContentBridgeChild::RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) { - return nsIContentChild::RecvAsyncMessage(aMsg, aData, aCpows, aPrincipal); + return nsIContentChild::RecvAsyncMessage(aMsg, aData, Move(aCpows), aPrincipal); } PBlobChild* diff --git a/dom/ipc/ContentBridgeChild.h b/dom/ipc/ContentBridgeChild.h index 90d3f7fd93ca..ede302fae4c2 100644 --- a/dom/ipc/ContentBridgeChild.h +++ b/dom/ipc/ContentBridgeChild.h @@ -29,7 +29,7 @@ public: virtual bool RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) MOZ_OVERRIDE; virtual PBlobChild* diff --git a/dom/ipc/ContentBridgeParent.cpp b/dom/ipc/ContentBridgeParent.cpp index f52923f115f9..2d98c9710a90 100644 --- a/dom/ipc/ContentBridgeParent.cpp +++ b/dom/ipc/ContentBridgeParent.cpp @@ -62,20 +62,22 @@ ContentBridgeParent::DeferredDestroy() bool ContentBridgeParent::RecvSyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals) { - return nsIContentParent::RecvSyncMessage(aMsg, aData, aCpows, aPrincipal, aRetvals); + return nsIContentParent::RecvSyncMessage(aMsg, aData, Move(aCpows), + aPrincipal, aRetvals); } bool ContentBridgeParent::RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) { - return nsIContentParent::RecvAsyncMessage(aMsg, aData, aCpows, aPrincipal); + return nsIContentParent::RecvAsyncMessage(aMsg, aData, Move(aCpows), + aPrincipal); } PBlobParent* diff --git a/dom/ipc/ContentBridgeParent.h b/dom/ipc/ContentBridgeParent.h index 369aa2d11000..e9d3e9a21948 100644 --- a/dom/ipc/ContentBridgeParent.h +++ b/dom/ipc/ContentBridgeParent.h @@ -75,12 +75,12 @@ protected: protected: virtual bool RecvSyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals) MOZ_OVERRIDE; virtual bool RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) MOZ_OVERRIDE; virtual jsipc::PJavaScriptParent* AllocPJavaScriptParent() MOZ_OVERRIDE; diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 6d629bc3f2cd..cb031e74ee39 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -1720,9 +1720,9 @@ ContentChild::DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor) } bool -ContentChild::RecvRegisterChrome(const InfallibleTArray& packages, - const InfallibleTArray& resources, - const InfallibleTArray& overrides, +ContentChild::RecvRegisterChrome(InfallibleTArray&& packages, + InfallibleTArray&& resources, + InfallibleTArray&& overrides, const nsCString& locale, const bool& reset) { @@ -1905,7 +1905,7 @@ ContentChild::RecvNotifyVisited(const URIParams& aURI) bool ContentChild::RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) { nsRefPtr cpm = nsFrameMessageManager::sChildProcessManager; @@ -1942,7 +1942,7 @@ ContentChild::RecvGeolocationError(const uint16_t& errorCode) } bool -ContentChild::RecvUpdateDictionaryList(const InfallibleTArray& aDictionaries) +ContentChild::RecvUpdateDictionaryList(InfallibleTArray&& aDictionaries) { mAvailableDictionaries = aDictionaries; mozInlineSpellChecker::UpdateCanEnableInlineSpellChecking(); @@ -2443,8 +2443,8 @@ ContentChild::RecvOnAppThemeChanged() bool ContentChild::RecvStartProfiler(const uint32_t& aEntries, const double& aInterval, - const nsTArray& aFeatures, - const nsTArray& aThreadNameFilters) + nsTArray&& aFeatures, + nsTArray&& aThreadNameFilters) { nsTArray featureArray; for (size_t i = 0; i < aFeatures.Length(); ++i) { diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index 043088c35b7e..0e76e01059ca 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -276,9 +276,9 @@ public: virtual PSpeechSynthesisChild* AllocPSpeechSynthesisChild() MOZ_OVERRIDE; virtual bool DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor) MOZ_OVERRIDE; - virtual bool RecvRegisterChrome(const InfallibleTArray& packages, - const InfallibleTArray& resources, - const InfallibleTArray& overrides, + virtual bool RecvRegisterChrome(InfallibleTArray&& packages, + InfallibleTArray&& resources, + InfallibleTArray&& overrides, const nsCString& locale, const bool& reset) MOZ_OVERRIDE; virtual bool RecvRegisterChromeItem(const ChromeRegistryItem& item) MOZ_OVERRIDE; @@ -306,14 +306,14 @@ public: virtual bool RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) MOZ_OVERRIDE; virtual bool RecvGeolocationUpdate(const GeoPosition& somewhere) MOZ_OVERRIDE; virtual bool RecvGeolocationError(const uint16_t& errorCode) MOZ_OVERRIDE; - virtual bool RecvUpdateDictionaryList(const InfallibleTArray& aDictionaries) MOZ_OVERRIDE; + virtual bool RecvUpdateDictionaryList(InfallibleTArray&& aDictionaries) MOZ_OVERRIDE; virtual bool RecvAddPermission(const IPC::Permission& permission) MOZ_OVERRIDE; @@ -377,8 +377,8 @@ public: virtual bool RecvStartProfiler(const uint32_t& aEntries, const double& aInterval, - const nsTArray& aFeatures, - const nsTArray& aThreadNameFilters) MOZ_OVERRIDE; + nsTArray&& aFeatures, + nsTArray&& aThreadNameFilters) MOZ_OVERRIDE; virtual bool RecvStopProfiler() MOZ_OVERRIDE; virtual bool RecvGetProfile(nsCString* aProfile) MOZ_OVERRIDE; virtual bool RecvShutdown() MOZ_OVERRIDE; diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index ffd1cf33f897..caf06a3e2120 100755 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -388,7 +388,8 @@ public: virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; - virtual bool Recv__delete__(const uint32_t& aGeneration, const InfallibleTArray& aReport) MOZ_OVERRIDE; + virtual bool Recv__delete__(const uint32_t& aGeneration, InfallibleTArray&& aReport) MOZ_OVERRIDE; + private: ContentParent* Owner() { @@ -408,7 +409,8 @@ MemoryReportRequestParent::ActorDestroy(ActorDestroyReason aWhy) } bool -MemoryReportRequestParent::Recv__delete__(const uint32_t& generation, const InfallibleTArray& childReports) +MemoryReportRequestParent::Recv__delete__(const uint32_t& generation, + nsTArray&& childReports) { nsRefPtr mgr = nsMemoryReporterManager::GetOrCreate(); @@ -2140,7 +2142,7 @@ FindFdProtocolFdMapping(const nsTArray& aFds, ContentParent::ContentParent(ContentParent* aTemplate, const nsAString& aAppManifestURL, base::ProcessHandle aPid, - const nsTArray& aFds) + InfallibleTArray&& aFds) : mAppManifestURL(aAppManifestURL) , mIsForBrowser(false) , mIsNuwaProcess(false) @@ -2714,7 +2716,7 @@ ContentParent::RecvNuwaWaitForFreeze() bool ContentParent::RecvAddNewProcess(const uint32_t& aPid, - const InfallibleTArray& aFds) + InfallibleTArray&& aFds) { #ifdef MOZ_NUWA_PROCESS if (!IsNuwaProcess()) { @@ -2730,7 +2732,7 @@ ContentParent::RecvAddNewProcess(const uint32_t& aPid, content = new ContentParent(this, MAGIC_PREALLOCATED_APP_MANIFEST_URL, aPid, - aFds); + Move(aFds)); content->Init(); size_t numNuwaPrefUpdates = sNuwaPrefUpdates ? @@ -3902,32 +3904,33 @@ ContentParent::RecvCloseAlert(const nsString& aName, bool ContentParent::RecvSyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals) { - return nsIContentParent::RecvSyncMessage(aMsg, aData, aCpows, aPrincipal, - aRetvals); + return nsIContentParent::RecvSyncMessage(aMsg, aData, Move(aCpows), + aPrincipal, aRetvals); } bool ContentParent::RecvRpcMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals) { - return nsIContentParent::RecvRpcMessage(aMsg, aData, aCpows, aPrincipal, + return nsIContentParent::RecvRpcMessage(aMsg, aData, Move(aCpows), aPrincipal, aRetvals); } bool ContentParent::RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) { - return nsIContentParent::RecvAsyncMessage(aMsg, aData, aCpows, aPrincipal); + return nsIContentParent::RecvAsyncMessage(aMsg, aData, Move(aCpows), + aPrincipal); } bool diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 56ddbc0fff5c..e3aea567d381 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -394,7 +394,7 @@ private: ContentParent(ContentParent* aTemplate, const nsAString& aAppManifestURL, base::ProcessHandle aPid, - const nsTArray& aFds); + InfallibleTArray&& aFds); #endif // The common initialization for the constructors. @@ -642,17 +642,17 @@ private: virtual bool RecvSyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals) MOZ_OVERRIDE; virtual bool RecvRpcMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals) MOZ_OVERRIDE; virtual bool RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) MOZ_OVERRIDE; virtual bool RecvFilePathUpdateNotify(const nsString& aType, @@ -713,7 +713,7 @@ private: virtual bool RecvNuwaWaitForFreeze() MOZ_OVERRIDE; virtual bool RecvAddNewProcess(const uint32_t& aPid, - const InfallibleTArray& aFds) MOZ_OVERRIDE; + InfallibleTArray&& aFds) MOZ_OVERRIDE; virtual bool RecvCreateFakeVolume(const nsString& fsName, const nsString& mountPoint) MOZ_OVERRIDE; diff --git a/dom/ipc/FilePickerParent.cpp b/dom/ipc/FilePickerParent.cpp index 2636d273c2c8..7093abd31431 100644 --- a/dom/ipc/FilePickerParent.cpp +++ b/dom/ipc/FilePickerParent.cpp @@ -201,8 +201,8 @@ FilePickerParent::RecvOpen(const int16_t& aSelectedType, const bool& aAddToRecentDocs, const nsString& aDefaultFile, const nsString& aDefaultExtension, - const InfallibleTArray& aFilters, - const InfallibleTArray& aFilterNames, + InfallibleTArray&& aFilters, + InfallibleTArray&& aFilterNames, const nsString& aDisplayDirectory) { if (!CreateFilePicker()) { diff --git a/dom/ipc/FilePickerParent.h b/dom/ipc/FilePickerParent.h index 5bcc82533c22..001a690cc02e 100644 --- a/dom/ipc/FilePickerParent.h +++ b/dom/ipc/FilePickerParent.h @@ -35,8 +35,8 @@ class FilePickerParent : public PFilePickerParent const bool& aAddToRecentDocs, const nsString& aDefaultFile, const nsString& aDefaultExtension, - const InfallibleTArray& aFilters, - const InfallibleTArray& aFilterNames, + InfallibleTArray&& aFilters, + InfallibleTArray&& aFilterNames, const nsString& aDisplayDirectory) MOZ_OVERRIDE; virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 7fa8042f0664..6943ee2df508 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -2978,7 +2978,7 @@ TabChild::RecvLoadRemoteScript(const nsString& aURL, const bool& aRunInGlobalSco bool TabChild::RecvAsyncMessage(const nsString& aMessage, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) { if (mTabChildGlobal) { diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index ca5d41cad3ab..8ce8cd1d7cad 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -375,7 +375,7 @@ public: const bool& aRunInGlobalScope) MOZ_OVERRIDE; virtual bool RecvAsyncMessage(const nsString& aMessage, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) MOZ_OVERRIDE; virtual bool RecvAppOfflineStatus(const uint32_t& aId, const bool& aOffline) MOZ_OVERRIDE; diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 44d07ba9501d..7d122f72e9c2 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -1287,7 +1287,7 @@ TabParent::TryCapture(const WidgetGUIEvent& aEvent) bool TabParent::RecvSyncMessage(const nsString& aMessage, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aJSONRetVal) { @@ -1309,7 +1309,7 @@ TabParent::RecvSyncMessage(const nsString& aMessage, bool TabParent::RecvRpcMessage(const nsString& aMessage, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aJSONRetVal) { @@ -1331,7 +1331,7 @@ TabParent::RecvRpcMessage(const nsString& aMessage, bool TabParent::RecvAsyncMessage(const nsString& aMessage, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) { // FIXME Permission check for TabParent in Content process @@ -1500,7 +1500,7 @@ TabParent::RecvNotifyIMETextChange(const uint32_t& aStart, bool TabParent::RecvNotifyIMESelectedCompositionRect( const uint32_t& aOffset, - const InfallibleTArray& aRects, + InfallibleTArray&& aRects, const uint32_t& aCaretOffset, const nsIntRect& aCaretRect) { @@ -1581,7 +1581,7 @@ TabParent::RecvNotifyIMEEditorRect(const nsIntRect& aRect) bool TabParent::RecvNotifyIMEPositionChange( const nsIntRect& aEditorRect, - const InfallibleTArray& aCompositionRects, + InfallibleTArray&& aCompositionRects, const nsIntRect& aCaretRect) { mIMEEditorRect = aEditorRect; @@ -1625,8 +1625,8 @@ TabParent::RecvRequestFocus(const bool& aCanRaise) bool TabParent::RecvEnableDisableCommands(const nsString& aAction, - const nsTArray& aEnabledCommands, - const nsTArray& aDisabledCommands) + nsTArray&& aEnabledCommands, + nsTArray&& aDisabledCommands) { nsCOMPtr remoteBrowser = do_QueryInterface(mFrameElement); if (remoteBrowser) { @@ -2352,7 +2352,7 @@ TabParent::RecvContentReceivedInputBlock(const ScrollableLayerGuid& aGuid, bool TabParent::RecvSetTargetAPZC(const uint64_t& aInputBlockId, - const nsTArray& aTargets) + nsTArray&& aTargets) { if (RenderFrameParent* rfp = GetRenderFrame()) { rfp->SetTargetAPZC(aInputBlockId, aTargets); diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index 057fbd68703a..aa04e9daf25d 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -147,17 +147,17 @@ public: InfallibleTArray* aFrameScripts) MOZ_OVERRIDE; virtual bool RecvSyncMessage(const nsString& aMessage, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aJSONRetVal) MOZ_OVERRIDE; virtual bool RecvRpcMessage(const nsString& aMessage, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aJSONRetVal) MOZ_OVERRIDE; virtual bool RecvAsyncMessage(const nsString& aMessage, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) MOZ_OVERRIDE; virtual bool RecvNotifyIMEFocus(const bool& aFocus, nsIMEUpdatePreference* aPreference, @@ -168,7 +168,7 @@ public: const bool& aCausedByComposition) MOZ_OVERRIDE; virtual bool RecvNotifyIMESelectedCompositionRect( const uint32_t& aOffset, - const InfallibleTArray& aRects, + InfallibleTArray&& aRects, const uint32_t& aCaretOffset, const nsIntRect& aCaretRect) MOZ_OVERRIDE; virtual bool RecvNotifyIMESelection(const uint32_t& aSeqno, @@ -182,7 +182,7 @@ public: virtual bool RecvNotifyIMEEditorRect(const nsIntRect& aRect) MOZ_OVERRIDE; virtual bool RecvNotifyIMEPositionChange( const nsIntRect& aEditoRect, - const InfallibleTArray& aCompositionRects, + InfallibleTArray&& aCompositionRects, const nsIntRect& aCaretRect) MOZ_OVERRIDE; virtual bool RecvEndIMEComposition(const bool& aCancel, nsString* aComposition) MOZ_OVERRIDE; @@ -198,8 +198,8 @@ public: const int32_t& aFocusChange) MOZ_OVERRIDE; virtual bool RecvRequestFocus(const bool& aCanRaise) MOZ_OVERRIDE; virtual bool RecvEnableDisableCommands(const nsString& aAction, - const nsTArray& aEnabledCommands, - const nsTArray& aDisabledCommands) MOZ_OVERRIDE; + nsTArray&& aEnabledCommands, + nsTArray&& aDisabledCommands) MOZ_OVERRIDE; virtual bool RecvSetCursor(const uint32_t& aValue, const bool& aForce) MOZ_OVERRIDE; virtual bool RecvSetBackgroundColor(const nscolor& aValue) MOZ_OVERRIDE; virtual bool RecvSetStatus(const uint32_t& aType, const nsString& aStatus) MOZ_OVERRIDE; @@ -220,7 +220,7 @@ public: const uint64_t& aInputBlockId, const bool& aPreventDefault) MOZ_OVERRIDE; virtual bool RecvSetTargetAPZC(const uint64_t& aInputBlockId, - const nsTArray& aTargets) MOZ_OVERRIDE; + nsTArray&& aTargets) MOZ_OVERRIDE; virtual PColorPickerParent* AllocPColorPickerParent(const nsString& aTitle, const nsString& aInitialColor) MOZ_OVERRIDE; diff --git a/dom/ipc/nsIContentChild.cpp b/dom/ipc/nsIContentChild.cpp index 05db627d3ca5..bcbedc01803a 100644 --- a/dom/ipc/nsIContentChild.cpp +++ b/dom/ipc/nsIContentChild.cpp @@ -115,7 +115,7 @@ nsIContentChild::GetOrCreateActorForBlob(File* aBlob) bool nsIContentChild::RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) { nsRefPtr cpm = nsFrameMessageManager::sChildProcessManager; diff --git a/dom/ipc/nsIContentChild.h b/dom/ipc/nsIContentChild.h index e95a277de40d..5d729a6f4b46 100644 --- a/dom/ipc/nsIContentChild.h +++ b/dom/ipc/nsIContentChild.h @@ -78,7 +78,7 @@ protected: virtual bool RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal); }; diff --git a/dom/ipc/nsIContentParent.cpp b/dom/ipc/nsIContentParent.cpp index 1ffefc698be9..93e567875dec 100644 --- a/dom/ipc/nsIContentParent.cpp +++ b/dom/ipc/nsIContentParent.cpp @@ -180,7 +180,7 @@ nsIContentParent::GetOrCreateActorForBlob(File* aBlob) bool nsIContentParent::RecvSyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals) { @@ -207,7 +207,7 @@ nsIContentParent::RecvSyncMessage(const nsString& aMsg, bool nsIContentParent::RecvRpcMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals) { @@ -234,7 +234,7 @@ nsIContentParent::RecvRpcMessage(const nsString& aMsg, bool nsIContentParent::RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal) { // FIXME Permission check in Content process diff --git a/dom/ipc/nsIContentParent.h b/dom/ipc/nsIContentParent.h index 3ad1a196df5b..e1174d454bc8 100644 --- a/dom/ipc/nsIContentParent.h +++ b/dom/ipc/nsIContentParent.h @@ -92,17 +92,17 @@ protected: // IPDL methods virtual bool RecvSyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals); virtual bool RecvRpcMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal, InfallibleTArray* aRetvals); virtual bool RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData, - const InfallibleTArray& aCpows, + InfallibleTArray&& aCpows, const IPC::Principal& aPrincipal); protected: // members diff --git a/dom/media/gmp/GMPDecryptorChild.cpp b/dom/media/gmp/GMPDecryptorChild.cpp index 2c8598e7e4d5..b8cf43da7cf8 100644 --- a/dom/media/gmp/GMPDecryptorChild.cpp +++ b/dom/media/gmp/GMPDecryptorChild.cpp @@ -211,7 +211,7 @@ bool GMPDecryptorChild::RecvCreateSession(const uint32_t& aCreateSessionToken, const uint32_t& aPromiseId, const nsCString& aInitDataType, - const nsTArray& aInitData, + InfallibleTArray&& aInitData, const GMPSessionType& aSessionType) { if (!mSession) { @@ -247,7 +247,7 @@ GMPDecryptorChild::RecvLoadSession(const uint32_t& aPromiseId, bool GMPDecryptorChild::RecvUpdateSession(const uint32_t& aPromiseId, const nsCString& aSessionId, - const nsTArray& aResponse) + InfallibleTArray&& aResponse) { if (!mSession) { return false; @@ -294,7 +294,7 @@ GMPDecryptorChild::RecvRemoveSession(const uint32_t& aPromiseId, bool GMPDecryptorChild::RecvSetServerCertificate(const uint32_t& aPromiseId, - const nsTArray& aServerCert) + InfallibleTArray&& aServerCert) { if (!mSession) { return false; @@ -309,7 +309,7 @@ GMPDecryptorChild::RecvSetServerCertificate(const uint32_t& aPromiseId, bool GMPDecryptorChild::RecvDecrypt(const uint32_t& aId, - const nsTArray& aBuffer, + InfallibleTArray&& aBuffer, const GMPDecryptionData& aMetadata) { if (!mSession) { diff --git a/dom/media/gmp/GMPDecryptorChild.h b/dom/media/gmp/GMPDecryptorChild.h index cfb8a9d5f0a2..ee1f72c327fd 100644 --- a/dom/media/gmp/GMPDecryptorChild.h +++ b/dom/media/gmp/GMPDecryptorChild.h @@ -92,7 +92,7 @@ private: virtual bool RecvCreateSession(const uint32_t& aCreateSessionToken, const uint32_t& aPromiseId, const nsCString& aInitDataType, - const nsTArray& aInitData, + InfallibleTArray&& aInitData, const GMPSessionType& aSessionType) MOZ_OVERRIDE; virtual bool RecvLoadSession(const uint32_t& aPromiseId, @@ -100,7 +100,7 @@ private: virtual bool RecvUpdateSession(const uint32_t& aPromiseId, const nsCString& aSessionId, - const nsTArray& aResponse) MOZ_OVERRIDE; + InfallibleTArray&& aResponse) MOZ_OVERRIDE; virtual bool RecvCloseSession(const uint32_t& aPromiseId, const nsCString& aSessionId) MOZ_OVERRIDE; @@ -109,12 +109,12 @@ private: const nsCString& aSessionId) MOZ_OVERRIDE; virtual bool RecvDecrypt(const uint32_t& aId, - const nsTArray& aBuffer, + InfallibleTArray&& aBuffer, const GMPDecryptionData& aMetadata) MOZ_OVERRIDE; // Resolve/reject promise on completion. virtual bool RecvSetServerCertificate(const uint32_t& aPromiseId, - const nsTArray& aServerCert) MOZ_OVERRIDE; + InfallibleTArray&& aServerCert) MOZ_OVERRIDE; virtual bool RecvDecryptingComplete() MOZ_OVERRIDE; diff --git a/dom/media/gmp/GMPDecryptorParent.cpp b/dom/media/gmp/GMPDecryptorParent.cpp index 94f9020f8397..946687b786e5 100644 --- a/dom/media/gmp/GMPDecryptorParent.cpp +++ b/dom/media/gmp/GMPDecryptorParent.cpp @@ -214,7 +214,7 @@ GMPDecryptorParent::RecvRejectPromise(const uint32_t& aPromiseId, bool GMPDecryptorParent::RecvSessionMessage(const nsCString& aSessionId, const GMPSessionMessageType& aMessageType, - const nsTArray& aMessage) + nsTArray&& aMessage) { if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); @@ -266,7 +266,7 @@ GMPDecryptorParent::RecvSessionError(const nsCString& aSessionId, bool GMPDecryptorParent::RecvKeyIdUsable(const nsCString& aSessionId, - const nsTArray& aKeyId) + InfallibleTArray&& aKeyId) { if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); @@ -278,7 +278,7 @@ GMPDecryptorParent::RecvKeyIdUsable(const nsCString& aSessionId, bool GMPDecryptorParent::RecvKeyIdNotUsable(const nsCString& aSessionId, - const nsTArray& aKeyId) + InfallibleTArray&& aKeyId) { if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); @@ -302,7 +302,7 @@ GMPDecryptorParent::RecvSetCaps(const uint64_t& aCaps) bool GMPDecryptorParent::RecvDecrypted(const uint32_t& aId, const GMPErr& aErr, - const nsTArray& aBuffer) + InfallibleTArray&& aBuffer) { if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); diff --git a/dom/media/gmp/GMPDecryptorParent.h b/dom/media/gmp/GMPDecryptorParent.h index 207160602ebe..b61e6e87e62e 100644 --- a/dom/media/gmp/GMPDecryptorParent.h +++ b/dom/media/gmp/GMPDecryptorParent.h @@ -79,7 +79,7 @@ private: virtual bool RecvSessionMessage(const nsCString& aSessionId, const GMPSessionMessageType& aMessageType, - const nsTArray& aMessage) MOZ_OVERRIDE; + nsTArray&& aMessage) MOZ_OVERRIDE; virtual bool RecvExpirationChange(const nsCString& aSessionId, const double& aExpiryTime) MOZ_OVERRIDE; @@ -92,14 +92,14 @@ private: const nsCString& aMessage) MOZ_OVERRIDE; virtual bool RecvKeyIdUsable(const nsCString& aSessionId, - const nsTArray& aKeyId) MOZ_OVERRIDE; + InfallibleTArray&& aKeyId) MOZ_OVERRIDE; virtual bool RecvKeyIdNotUsable(const nsCString& aSessionId, - const nsTArray& aKeyId) MOZ_OVERRIDE; + InfallibleTArray&& aKeyId) MOZ_OVERRIDE; virtual bool RecvDecrypted(const uint32_t& aId, const GMPErr& aErr, - const nsTArray& aBuffer) MOZ_OVERRIDE; + InfallibleTArray&& aBuffer) MOZ_OVERRIDE; virtual bool RecvSetCaps(const uint64_t& aCaps) MOZ_OVERRIDE; diff --git a/dom/media/gmp/GMPStorageChild.cpp b/dom/media/gmp/GMPStorageChild.cpp index 30d16f27fdea..e41c6cc3351e 100644 --- a/dom/media/gmp/GMPStorageChild.cpp +++ b/dom/media/gmp/GMPStorageChild.cpp @@ -242,7 +242,7 @@ GMPStorageChild::RecvOpenComplete(const nsCString& aRecordName, bool GMPStorageChild::RecvReadComplete(const nsCString& aRecordName, const GMPErr& aStatus, - const InfallibleTArray& aBytes) + InfallibleTArray&& aBytes) { if (mShutdown) { return true; @@ -330,7 +330,7 @@ private: }; bool -GMPStorageChild::RecvRecordNames(const InfallibleTArray& aRecordNames, +GMPStorageChild::RecvRecordNames(InfallibleTArray&& aRecordNames, const GMPErr& aStatus) { RecordIteratorContext ctx; diff --git a/dom/media/gmp/GMPStorageChild.h b/dom/media/gmp/GMPStorageChild.h index 4973aeabf232..972b1b3e1bea 100644 --- a/dom/media/gmp/GMPStorageChild.h +++ b/dom/media/gmp/GMPStorageChild.h @@ -85,10 +85,10 @@ protected: const GMPErr& aStatus) MOZ_OVERRIDE; virtual bool RecvReadComplete(const nsCString& aRecordName, const GMPErr& aStatus, - const InfallibleTArray& aBytes) MOZ_OVERRIDE; + InfallibleTArray&& aBytes) MOZ_OVERRIDE; virtual bool RecvWriteComplete(const nsCString& aRecordName, const GMPErr& aStatus) MOZ_OVERRIDE; - virtual bool RecvRecordNames(const InfallibleTArray& aRecordNames, + virtual bool RecvRecordNames(InfallibleTArray&& aRecordNames, const GMPErr& aStatus) MOZ_OVERRIDE; virtual bool RecvShutdown() MOZ_OVERRIDE; diff --git a/dom/media/gmp/GMPStorageParent.cpp b/dom/media/gmp/GMPStorageParent.cpp index 494702e2aa60..5274e8b8ec7f 100644 --- a/dom/media/gmp/GMPStorageParent.cpp +++ b/dom/media/gmp/GMPStorageParent.cpp @@ -540,7 +540,7 @@ GMPStorageParent::RecvRead(const nsCString& aRecordName) bool GMPStorageParent::RecvWrite(const nsCString& aRecordName, - const InfallibleTArray& aBytes) + InfallibleTArray&& aBytes) { LOGD(("%s::%s: %p record=%s", __CLASS__, __FUNCTION__, this, aRecordName.get())); diff --git a/dom/media/gmp/GMPStorageParent.h b/dom/media/gmp/GMPStorageParent.h index a9e3bc46b64d..403e43a3fbef 100644 --- a/dom/media/gmp/GMPStorageParent.h +++ b/dom/media/gmp/GMPStorageParent.h @@ -42,7 +42,7 @@ protected: virtual bool RecvOpen(const nsCString& aRecordName) MOZ_OVERRIDE; virtual bool RecvRead(const nsCString& aRecordName) MOZ_OVERRIDE; virtual bool RecvWrite(const nsCString& aRecordName, - const InfallibleTArray& aBytes) MOZ_OVERRIDE; + InfallibleTArray&& aBytes) MOZ_OVERRIDE; virtual bool RecvGetRecordNames() MOZ_OVERRIDE; virtual bool RecvClose(const nsCString& aRecordName) MOZ_OVERRIDE; virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; diff --git a/dom/media/gmp/GMPVideoDecoderChild.cpp b/dom/media/gmp/GMPVideoDecoderChild.cpp index 8afe79e5140e..bed62b923c91 100644 --- a/dom/media/gmp/GMPVideoDecoderChild.cpp +++ b/dom/media/gmp/GMPVideoDecoderChild.cpp @@ -107,7 +107,7 @@ GMPVideoDecoderChild::Error(GMPErr aError) bool GMPVideoDecoderChild::RecvInitDecode(const GMPVideoCodec& aCodecSettings, - const nsTArray& aCodecSpecific, + InfallibleTArray&& aCodecSpecific, const int32_t& aCoreCount) { if (!mVideoDecoder) { @@ -126,7 +126,7 @@ GMPVideoDecoderChild::RecvInitDecode(const GMPVideoCodec& aCodecSettings, bool GMPVideoDecoderChild::RecvDecode(const GMPVideoEncodedFrameData& aInputFrame, const bool& aMissingFrames, - const nsTArray& aCodecSpecificInfo, + InfallibleTArray&& aCodecSpecificInfo, const int64_t& aRenderTimeMs) { if (!mVideoDecoder) { @@ -146,7 +146,7 @@ GMPVideoDecoderChild::RecvDecode(const GMPVideoEncodedFrameData& aInputFrame, } bool -GMPVideoDecoderChild::RecvChildShmemForPool(Shmem& aFrameBuffer) +GMPVideoDecoderChild::RecvChildShmemForPool(Shmem&& aFrameBuffer) { if (aFrameBuffer.IsWritable()) { mVideoHost.SharedMemMgr()->MgrDeallocShmem(GMPSharedMem::kGMPFrameData, diff --git a/dom/media/gmp/GMPVideoDecoderChild.h b/dom/media/gmp/GMPVideoDecoderChild.h index d5438481d4e5..c28e62f279d3 100644 --- a/dom/media/gmp/GMPVideoDecoderChild.h +++ b/dom/media/gmp/GMPVideoDecoderChild.h @@ -63,13 +63,13 @@ public: private: // PGMPVideoDecoderChild virtual bool RecvInitDecode(const GMPVideoCodec& aCodecSettings, - const nsTArray& aCodecSpecific, + InfallibleTArray&& aCodecSpecific, const int32_t& aCoreCount) MOZ_OVERRIDE; virtual bool RecvDecode(const GMPVideoEncodedFrameData& aInputFrame, const bool& aMissingFrames, - const nsTArray& aCodecSpecificInfo, + InfallibleTArray&& aCodecSpecificInfo, const int64_t& aRenderTimeMs) MOZ_OVERRIDE; - virtual bool RecvChildShmemForPool(Shmem& aFrameBuffer) MOZ_OVERRIDE; + virtual bool RecvChildShmemForPool(Shmem&& aFrameBuffer) MOZ_OVERRIDE; virtual bool RecvReset() MOZ_OVERRIDE; virtual bool RecvDrain() MOZ_OVERRIDE; virtual bool RecvDecodingComplete() MOZ_OVERRIDE; diff --git a/dom/media/gmp/GMPVideoDecoderParent.cpp b/dom/media/gmp/GMPVideoDecoderParent.cpp index 27284a7f20f8..4c26bfe508af 100644 --- a/dom/media/gmp/GMPVideoDecoderParent.cpp +++ b/dom/media/gmp/GMPVideoDecoderParent.cpp @@ -322,7 +322,7 @@ GMPVideoDecoderParent::RecvError(const GMPErr& aError) } bool -GMPVideoDecoderParent::RecvParentShmemForPool(Shmem& aEncodedBuffer) +GMPVideoDecoderParent::RecvParentShmemForPool(Shmem&& aEncodedBuffer) { if (aEncodedBuffer.IsWritable()) { mVideoHost.SharedMemMgr()->MgrDeallocShmem(GMPSharedMem::kGMPEncodedData, diff --git a/dom/media/gmp/GMPVideoDecoderParent.h b/dom/media/gmp/GMPVideoDecoderParent.h index 36f3b2bc349b..533c99cf0d48 100644 --- a/dom/media/gmp/GMPVideoDecoderParent.h +++ b/dom/media/gmp/GMPVideoDecoderParent.h @@ -71,7 +71,7 @@ private: virtual bool RecvDrainComplete() MOZ_OVERRIDE; virtual bool RecvResetComplete() MOZ_OVERRIDE; virtual bool RecvError(const GMPErr& aError) MOZ_OVERRIDE; - virtual bool RecvParentShmemForPool(Shmem& aEncodedBuffer) MOZ_OVERRIDE; + virtual bool RecvParentShmemForPool(Shmem&& aEncodedBuffer) MOZ_OVERRIDE; virtual bool AnswerNeedShmem(const uint32_t& aFrameBufferSize, Shmem* aMem) MOZ_OVERRIDE; virtual bool Recv__delete__() MOZ_OVERRIDE; diff --git a/dom/media/gmp/GMPVideoEncoderChild.cpp b/dom/media/gmp/GMPVideoEncoderChild.cpp index 446e46263780..14df35e28e48 100644 --- a/dom/media/gmp/GMPVideoEncoderChild.cpp +++ b/dom/media/gmp/GMPVideoEncoderChild.cpp @@ -68,7 +68,7 @@ GMPVideoEncoderChild::Error(GMPErr aError) bool GMPVideoEncoderChild::RecvInitEncode(const GMPVideoCodec& aCodecSettings, - const nsTArray& aCodecSpecific, + InfallibleTArray&& aCodecSpecific, const int32_t& aNumberOfCores, const uint32_t& aMaxPayloadSize) { @@ -89,8 +89,8 @@ GMPVideoEncoderChild::RecvInitEncode(const GMPVideoCodec& aCodecSettings, bool GMPVideoEncoderChild::RecvEncode(const GMPVideoi420FrameData& aInputFrame, - const nsTArray& aCodecSpecificInfo, - const nsTArray& aFrameTypes) + InfallibleTArray&& aCodecSpecificInfo, + InfallibleTArray&& aFrameTypes) { if (!mVideoEncoder) { return false; @@ -109,7 +109,7 @@ GMPVideoEncoderChild::RecvEncode(const GMPVideoi420FrameData& aInputFrame, } bool -GMPVideoEncoderChild::RecvChildShmemForPool(Shmem& aEncodedBuffer) +GMPVideoEncoderChild::RecvChildShmemForPool(Shmem&& aEncodedBuffer) { if (aEncodedBuffer.IsWritable()) { mVideoHost.SharedMemMgr()->MgrDeallocShmem(GMPSharedMem::kGMPEncodedData, diff --git a/dom/media/gmp/GMPVideoEncoderChild.h b/dom/media/gmp/GMPVideoEncoderChild.h index 70b71e05146e..921e42f1ec63 100644 --- a/dom/media/gmp/GMPVideoEncoderChild.h +++ b/dom/media/gmp/GMPVideoEncoderChild.h @@ -59,13 +59,13 @@ public: private: // PGMPVideoEncoderChild virtual bool RecvInitEncode(const GMPVideoCodec& aCodecSettings, - const nsTArray& aCodecSpecific, + InfallibleTArray&& aCodecSpecific, const int32_t& aNumberOfCores, const uint32_t& aMaxPayloadSize) MOZ_OVERRIDE; virtual bool RecvEncode(const GMPVideoi420FrameData& aInputFrame, - const nsTArray& aCodecSpecificInfo, - const nsTArray& aFrameTypes) MOZ_OVERRIDE; - virtual bool RecvChildShmemForPool(Shmem& aEncodedBuffer) MOZ_OVERRIDE; + InfallibleTArray&& aCodecSpecificInfo, + InfallibleTArray&& aFrameTypes) MOZ_OVERRIDE; + virtual bool RecvChildShmemForPool(Shmem&& aEncodedBuffer) MOZ_OVERRIDE; virtual bool RecvSetChannelParameters(const uint32_t& aPacketLoss, const uint32_t& aRTT) MOZ_OVERRIDE; virtual bool RecvSetRates(const uint32_t& aNewBitRate, diff --git a/dom/media/gmp/GMPVideoEncoderParent.cpp b/dom/media/gmp/GMPVideoEncoderParent.cpp index 44dbd5e1d30e..3882bcaa5127 100644 --- a/dom/media/gmp/GMPVideoEncoderParent.cpp +++ b/dom/media/gmp/GMPVideoEncoderParent.cpp @@ -288,7 +288,7 @@ EncodedCallback(GMPVideoEncoderCallbackProxy* aCallback, bool GMPVideoEncoderParent::RecvEncoded(const GMPVideoEncodedFrameData& aEncodedFrame, - const nsTArray& aCodecSpecificInfo) + InfallibleTArray&& aCodecSpecificInfo) { if (!mCallback) { return false; @@ -320,7 +320,7 @@ GMPVideoEncoderParent::RecvError(const GMPErr& aError) } bool -GMPVideoEncoderParent::RecvParentShmemForPool(Shmem& aFrameBuffer) +GMPVideoEncoderParent::RecvParentShmemForPool(Shmem&& aFrameBuffer) { if (aFrameBuffer.IsWritable()) { mVideoHost.SharedMemMgr()->MgrDeallocShmem(GMPSharedMem::kGMPFrameData, diff --git a/dom/media/gmp/GMPVideoEncoderParent.h b/dom/media/gmp/GMPVideoEncoderParent.h index aaec972bf803..dcada4d865d2 100644 --- a/dom/media/gmp/GMPVideoEncoderParent.h +++ b/dom/media/gmp/GMPVideoEncoderParent.h @@ -66,9 +66,9 @@ private: // PGMPVideoEncoderParent virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; virtual bool RecvEncoded(const GMPVideoEncodedFrameData& aEncodedFrame, - const nsTArray& aCodecSpecificInfo) MOZ_OVERRIDE; + InfallibleTArray&& aCodecSpecificInfo) MOZ_OVERRIDE; virtual bool RecvError(const GMPErr& aError) MOZ_OVERRIDE; - virtual bool RecvParentShmemForPool(Shmem& aFrameBuffer) MOZ_OVERRIDE; + virtual bool RecvParentShmemForPool(Shmem&& aFrameBuffer) MOZ_OVERRIDE; virtual bool AnswerNeedShmem(const uint32_t& aEncodedBufferSize, Shmem* aMem) MOZ_OVERRIDE; virtual bool Recv__delete__() MOZ_OVERRIDE; diff --git a/dom/network/UDPSocketChild.cpp b/dom/network/UDPSocketChild.cpp index 48bb0a1ee8dd..eb6a86f503d9 100644 --- a/dom/network/UDPSocketChild.cpp +++ b/dom/network/UDPSocketChild.cpp @@ -235,7 +235,7 @@ UDPSocketChild::RecvCallbackClosed() bool UDPSocketChild::RecvCallbackReceivedData(const UDPAddressInfo& aAddressInfo, - const InfallibleTArray& aData) + InfallibleTArray&& aData) { nsresult rv = mSocket->CallListenerReceivedData(aAddressInfo.addr(), aAddressInfo.port(), aData.Elements(), aData.Length()); diff --git a/dom/network/UDPSocketChild.h b/dom/network/UDPSocketChild.h index d154e304f7ec..669ac2515bc1 100644 --- a/dom/network/UDPSocketChild.h +++ b/dom/network/UDPSocketChild.h @@ -43,7 +43,7 @@ public: virtual bool RecvCallbackOpened(const UDPAddressInfo& aAddressInfo) MOZ_OVERRIDE; virtual bool RecvCallbackClosed() MOZ_OVERRIDE; virtual bool RecvCallbackReceivedData(const UDPAddressInfo& aAddressInfo, - const InfallibleTArray& aData) MOZ_OVERRIDE; + InfallibleTArray&& aData) MOZ_OVERRIDE; virtual bool RecvCallbackError(const nsCString& aMessage, const nsCString& aFilename, const uint32_t& aLineNumber) MOZ_OVERRIDE; diff --git a/dom/network/UDPSocketParent.h b/dom/network/UDPSocketParent.h index e09cb0c2c015..de7ae2a72603 100644 --- a/dom/network/UDPSocketParent.h +++ b/dom/network/UDPSocketParent.h @@ -34,7 +34,6 @@ public: virtual bool RecvOutgoingData(const UDPData& aData, const UDPSocketAddr& aAddr) MOZ_OVERRIDE; virtual bool RecvClose() MOZ_OVERRIDE; - virtual bool RecvRequestDelete() MOZ_OVERRIDE; virtual bool RecvJoinMulticast(const nsCString& aMulticastAddress, const nsCString& aInterface) MOZ_OVERRIDE; diff --git a/dom/notification/Notification.cpp b/dom/notification/Notification.cpp index 2c25d33492c2..a6ae76a47536 100644 --- a/dom/notification/Notification.cpp +++ b/dom/notification/Notification.cpp @@ -332,9 +332,9 @@ NotificationPermissionRequest::GetTypes(nsIArray** aTypes) { nsTArray emptyOptions; return nsContentPermissionUtils::CreatePermissionArray(NS_LITERAL_CSTRING("desktop-notification"), - NS_LITERAL_CSTRING("unused"), - emptyOptions, - aTypes); + NS_LITERAL_CSTRING("unused"), + emptyOptions, + aTypes); } NS_IMPL_ISUPPORTS(NotificationTask, nsIRunnable) diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp index c0071f7af3b4..c87166a05b14 100644 --- a/dom/plugins/ipc/PluginInstanceChild.cpp +++ b/dom/plugins/ipc/PluginInstanceChild.cpp @@ -855,7 +855,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent(const NPRemoteEvent& event, bool PluginInstanceChild::AnswerNPP_HandleEvent_Shmem(const NPRemoteEvent& event, - Shmem& mem, + Shmem&& mem, int16_t* handled, Shmem* rtnmem) { @@ -919,7 +919,7 @@ PluginInstanceChild::AnswerNPP_HandleEvent_Shmem(const NPRemoteEvent& event, #else bool PluginInstanceChild::AnswerNPP_HandleEvent_Shmem(const NPRemoteEvent& event, - Shmem& mem, + Shmem&& mem, int16_t* handled, Shmem* rtnmem) { diff --git a/dom/plugins/ipc/PluginInstanceChild.h b/dom/plugins/ipc/PluginInstanceChild.h index 242017f3b955..b7789dd11475 100644 --- a/dom/plugins/ipc/PluginInstanceChild.h +++ b/dom/plugins/ipc/PluginInstanceChild.h @@ -89,7 +89,7 @@ protected: AnswerNPP_HandleEvent(const NPRemoteEvent& event, int16_t* handled) MOZ_OVERRIDE; virtual bool AnswerNPP_HandleEvent_Shmem(const NPRemoteEvent& event, - Shmem& mem, + Shmem&& mem, int16_t* handled, Shmem* rtnmem) MOZ_OVERRIDE; virtual bool diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp index fe4e725c3c4a..e7960cff08cd 100644 --- a/dom/plugins/ipc/PluginModuleChild.cpp +++ b/dom/plugins/ipc/PluginModuleChild.cpp @@ -2131,8 +2131,8 @@ bool PluginModuleChild::RecvPPluginInstanceConstructor(PPluginInstanceChild* aActor, const nsCString& aMimeType, const uint16_t& aMode, - const InfallibleTArray& aNames, - const InfallibleTArray& aValues) + InfallibleTArray&& aNames, + InfallibleTArray&& aValues) { PLUGIN_LOG_DEBUG_METHOD; AssertPluginThread(); @@ -2478,8 +2478,8 @@ PluginModuleChild::ProcessNativeEvents() { bool PluginModuleChild::RecvStartProfiler(const uint32_t& aEntries, const double& aInterval, - const nsTArray& aFeatures, - const nsTArray& aThreadNameFilters) + nsTArray&& aFeatures, + nsTArray&& aThreadNameFilters) { nsTArray featureArray; for (size_t i = 0; i < aFeatures.Length(); ++i) { diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h index 02b946a9ca48..3b8a838baa5a 100644 --- a/dom/plugins/ipc/PluginModuleChild.h +++ b/dom/plugins/ipc/PluginModuleChild.h @@ -101,8 +101,8 @@ protected: RecvPPluginInstanceConstructor(PPluginInstanceChild* aActor, const nsCString& aMimeType, const uint16_t& aMode, - const InfallibleTArray& aNames, - const InfallibleTArray& aValues) + InfallibleTArray&& aNames, + InfallibleTArray&& aValues) MOZ_OVERRIDE; virtual bool AnswerNP_Shutdown(NPError *rv) MOZ_OVERRIDE; @@ -149,8 +149,8 @@ protected: virtual bool RecvStartProfiler(const uint32_t& aEntries, const double& aInterval, - const nsTArray& aFeatures, - const nsTArray& aThreadNameFilters) MOZ_OVERRIDE; + nsTArray&& aFeatures, + nsTArray&& aThreadNameFilters) MOZ_OVERRIDE; virtual bool RecvStopProfiler() MOZ_OVERRIDE; virtual bool AnswerGetProfile(nsCString* aProfile) MOZ_OVERRIDE; diff --git a/dom/plugins/ipc/PluginScriptableObjectChild.cpp b/dom/plugins/ipc/PluginScriptableObjectChild.cpp index bd3f61eae2aa..9f6231345bd0 100644 --- a/dom/plugins/ipc/PluginScriptableObjectChild.cpp +++ b/dom/plugins/ipc/PluginScriptableObjectChild.cpp @@ -753,7 +753,7 @@ PluginScriptableObjectChild::AnswerHasMethod(const PluginIdentifier& aId, bool PluginScriptableObjectChild::AnswerInvoke(const PluginIdentifier& aId, - const InfallibleTArray& aArgs, + InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) { @@ -823,7 +823,7 @@ PluginScriptableObjectChild::AnswerInvoke(const PluginIdentifier& aId, } bool -PluginScriptableObjectChild::AnswerInvokeDefault(const InfallibleTArray& aArgs, +PluginScriptableObjectChild::AnswerInvokeDefault(InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) { @@ -1074,7 +1074,7 @@ PluginScriptableObjectChild::AnswerEnumerate(InfallibleTArray* } bool -PluginScriptableObjectChild::AnswerConstruct(const InfallibleTArray& aArgs, +PluginScriptableObjectChild::AnswerConstruct(InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) { diff --git a/dom/plugins/ipc/PluginScriptableObjectChild.h b/dom/plugins/ipc/PluginScriptableObjectChild.h index 9079f96fa0e0..c86435c8a0f3 100644 --- a/dom/plugins/ipc/PluginScriptableObjectChild.h +++ b/dom/plugins/ipc/PluginScriptableObjectChild.h @@ -63,12 +63,12 @@ public: virtual bool AnswerInvoke(const PluginIdentifier& aId, - const InfallibleTArray& aArgs, + InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) MOZ_OVERRIDE; virtual bool - AnswerInvokeDefault(const InfallibleTArray& aArgs, + AnswerInvokeDefault(InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) MOZ_OVERRIDE; @@ -97,7 +97,7 @@ public: bool* aSuccess) MOZ_OVERRIDE; virtual bool - AnswerConstruct(const InfallibleTArray& aArgs, + AnswerConstruct(InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) MOZ_OVERRIDE; diff --git a/dom/plugins/ipc/PluginScriptableObjectParent.cpp b/dom/plugins/ipc/PluginScriptableObjectParent.cpp index 60a5186e5689..16387b998203 100644 --- a/dom/plugins/ipc/PluginScriptableObjectParent.cpp +++ b/dom/plugins/ipc/PluginScriptableObjectParent.cpp @@ -783,7 +783,7 @@ PluginScriptableObjectParent::AnswerHasMethod(const PluginIdentifier& aId, bool PluginScriptableObjectParent::AnswerInvoke(const PluginIdentifier& aId, - const InfallibleTArray& aArgs, + InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) { @@ -873,7 +873,7 @@ PluginScriptableObjectParent::AnswerInvoke(const PluginIdentifier& aId, } bool -PluginScriptableObjectParent::AnswerInvokeDefault(const InfallibleTArray& aArgs, +PluginScriptableObjectParent::AnswerInvokeDefault(InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) { @@ -1193,7 +1193,7 @@ PluginScriptableObjectParent::AnswerEnumerate(InfallibleTArray } bool -PluginScriptableObjectParent::AnswerConstruct(const InfallibleTArray& aArgs, +PluginScriptableObjectParent::AnswerConstruct(InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) { diff --git a/dom/plugins/ipc/PluginScriptableObjectParent.h b/dom/plugins/ipc/PluginScriptableObjectParent.h index dfb67e99858c..ed677ea8f9f2 100644 --- a/dom/plugins/ipc/PluginScriptableObjectParent.h +++ b/dom/plugins/ipc/PluginScriptableObjectParent.h @@ -54,12 +54,12 @@ public: virtual bool AnswerInvoke(const PluginIdentifier& aId, - const InfallibleTArray& aArgs, + InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) MOZ_OVERRIDE; virtual bool - AnswerInvokeDefault(const InfallibleTArray& aArgs, + AnswerInvokeDefault(InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) MOZ_OVERRIDE; @@ -86,7 +86,7 @@ public: bool* aSuccess) MOZ_OVERRIDE; virtual bool - AnswerConstruct(const InfallibleTArray& aArgs, + AnswerConstruct(InfallibleTArray&& aArgs, Variant* aResult, bool* aSuccess) MOZ_OVERRIDE; diff --git a/dom/plugins/ipc/PluginWidgetParent.cpp b/dom/plugins/ipc/PluginWidgetParent.cpp index b784fb67035e..7b580452b131 100644 --- a/dom/plugins/ipc/PluginWidgetParent.cpp +++ b/dom/plugins/ipc/PluginWidgetParent.cpp @@ -217,7 +217,7 @@ PluginWidgetParent::RecvMove(const double& aX, const double& aY) } bool -PluginWidgetParent::RecvSetWindowClipRegion(const nsTArray& Regions, +PluginWidgetParent::RecvSetWindowClipRegion(InfallibleTArray&& Regions, const bool& aIntersectWithExisting) { ENSURE_CHANNEL; diff --git a/dom/plugins/ipc/PluginWidgetParent.h b/dom/plugins/ipc/PluginWidgetParent.h index 676d02e7b941..176f934938f9 100644 --- a/dom/plugins/ipc/PluginWidgetParent.h +++ b/dom/plugins/ipc/PluginWidgetParent.h @@ -36,8 +36,8 @@ public: virtual bool RecvGetNativePluginPort(uintptr_t* value) MOZ_OVERRIDE; virtual bool RecvResize(const nsIntRect& aRect) MOZ_OVERRIDE; virtual bool RecvMove(const double& aX, const double& aY) MOZ_OVERRIDE; - virtual bool RecvSetWindowClipRegion(const nsTArray& Regions, - const bool& aIntersectWithExisting) MOZ_OVERRIDE; + virtual bool RecvSetWindowClipRegion(InfallibleTArray&& Regions, + const bool& aIntersectWithExisting) MOZ_OVERRIDE; private: // The tab our connection is associated with. diff --git a/dom/storage/DOMStorageIPC.cpp b/dom/storage/DOMStorageIPC.cpp index eb8726705eb5..10ae15a0fe63 100644 --- a/dom/storage/DOMStorageIPC.cpp +++ b/dom/storage/DOMStorageIPC.cpp @@ -214,7 +214,7 @@ DOMStorageDBChild::RecvObserve(const nsCString& aTopic, } bool -DOMStorageDBChild::RecvScopesHavingData(const InfallibleTArray& aScopes) +DOMStorageDBChild::RecvScopesHavingData(nsTArray&& aScopes) { for (uint32_t i = 0; i < aScopes.Length(); ++i) { ScopesHavingData().PutEntry(aScopes[i]); diff --git a/dom/storage/DOMStorageIPC.h b/dom/storage/DOMStorageIPC.h index a0bcdfdd0356..934e0395172e 100644 --- a/dom/storage/DOMStorageIPC.h +++ b/dom/storage/DOMStorageIPC.h @@ -74,7 +74,7 @@ private: const nsString& aValue); bool RecvLoadDone(const nsCString& aScope, const nsresult& aRv); - bool RecvScopesHavingData(const InfallibleTArray& aScopes); + bool RecvScopesHavingData(nsTArray&& aScopes); bool RecvLoadUsage(const nsCString& aScope, const int64_t& aUsage); bool RecvError(const nsresult& aRv); diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp index 596e978dc509..e41e7dab5f2a 100644 --- a/gfx/layers/ipc/ImageBridgeChild.cpp +++ b/gfx/layers/ipc/ImageBridgeChild.cpp @@ -845,7 +845,7 @@ ImageBridgeChild::DeallocPTextureChild(PTextureChild* actor) } bool -ImageBridgeChild::RecvParentAsyncMessages(const InfallibleTArray& aMessages) +ImageBridgeChild::RecvParentAsyncMessages(InfallibleTArray&& aMessages) { for (AsyncParentMessageArray::index_type i = 0; i < aMessages.Length(); ++i) { const AsyncParentMessageData& message = aMessages[i]; diff --git a/gfx/layers/ipc/ImageBridgeChild.h b/gfx/layers/ipc/ImageBridgeChild.h index 6899cd064399..15f9f870f186 100644 --- a/gfx/layers/ipc/ImageBridgeChild.h +++ b/gfx/layers/ipc/ImageBridgeChild.h @@ -189,7 +189,7 @@ public: DeallocPTextureChild(PTextureChild* actor) MOZ_OVERRIDE; virtual bool - RecvParentAsyncMessages(const InfallibleTArray& aMessages) MOZ_OVERRIDE; + RecvParentAsyncMessages(InfallibleTArray&& aMessages) MOZ_OVERRIDE; TemporaryRef CreateImageClient(CompositableType aType); TemporaryRef CreateImageClientNow(CompositableType aType); diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgeParent.cpp index 6f77bcc0acd5..d956c2bafc7f 100644 --- a/gfx/layers/ipc/ImageBridgeParent.cpp +++ b/gfx/layers/ipc/ImageBridgeParent.cpp @@ -111,7 +111,7 @@ private: }; bool -ImageBridgeParent::RecvUpdate(const EditArray& aEdits, EditReplyArray* aReply) +ImageBridgeParent::RecvUpdate(EditArray&& aEdits, EditReplyArray* aReply) { AutoImageBridgeParentAsyncMessageSender autoAsyncMessageSender(this); @@ -144,10 +144,10 @@ ImageBridgeParent::RecvUpdate(const EditArray& aEdits, EditReplyArray* aReply) } bool -ImageBridgeParent::RecvUpdateNoSwap(const EditArray& aEdits) +ImageBridgeParent::RecvUpdateNoSwap(EditArray&& aEdits) { InfallibleTArray noReplies; - bool success = RecvUpdate(aEdits, &noReplies); + bool success = RecvUpdate(Move(aEdits), &noReplies); NS_ABORT_IF_FALSE(noReplies.Length() == 0, "RecvUpdateNoSwap requires a sync Update to carry Edits"); return success; } @@ -268,7 +268,7 @@ ImageBridgeParent::SendAsyncMessage(const InfallibleTArray& aMessages) +ImageBridgeParent::RecvChildAsyncMessages(InfallibleTArray&& aMessages) { for (AsyncChildMessageArray::index_type i = 0; i < aMessages.Length(); ++i) { const AsyncChildMessageData& message = aMessages[i]; diff --git a/gfx/layers/ipc/ImageBridgeParent.h b/gfx/layers/ipc/ImageBridgeParent.h index 2379c91193eb..83eb71d6cfce 100644 --- a/gfx/layers/ipc/ImageBridgeParent.h +++ b/gfx/layers/ipc/ImageBridgeParent.h @@ -71,8 +71,8 @@ public: } // PImageBridge - virtual bool RecvUpdate(const EditArray& aEdits, EditReplyArray* aReply) MOZ_OVERRIDE; - virtual bool RecvUpdateNoSwap(const EditArray& aEdits) MOZ_OVERRIDE; + virtual bool RecvUpdate(EditArray&& aEdits, EditReplyArray* aReply) MOZ_OVERRIDE; + virtual bool RecvUpdateNoSwap(EditArray&& aEdits) MOZ_OVERRIDE; virtual bool IsAsync() const MOZ_OVERRIDE { return true; } @@ -85,7 +85,7 @@ public: virtual bool DeallocPTextureParent(PTextureParent* actor) MOZ_OVERRIDE; virtual bool - RecvChildAsyncMessages(const InfallibleTArray& aMessages) MOZ_OVERRIDE; + RecvChildAsyncMessages(InfallibleTArray&& aMessages) MOZ_OVERRIDE; // Shutdown step 1 virtual bool RecvWillStop() MOZ_OVERRIDE; diff --git a/gfx/layers/ipc/LayerTransactionChild.cpp b/gfx/layers/ipc/LayerTransactionChild.cpp index ce10a68a63c0..392e4d5330cb 100644 --- a/gfx/layers/ipc/LayerTransactionChild.cpp +++ b/gfx/layers/ipc/LayerTransactionChild.cpp @@ -75,7 +75,7 @@ LayerTransactionChild::DeallocPCompositableChild(PCompositableChild* actor) } bool -LayerTransactionChild::RecvParentAsyncMessages(const InfallibleTArray& aMessages) +LayerTransactionChild::RecvParentAsyncMessages(InfallibleTArray&& aMessages) { for (AsyncParentMessageArray::index_type i = 0; i < aMessages.Length(); ++i) { const AsyncParentMessageData& message = aMessages[i]; diff --git a/gfx/layers/ipc/LayerTransactionChild.h b/gfx/layers/ipc/LayerTransactionChild.h index 05eb69866b9f..2a118053eeb4 100644 --- a/gfx/layers/ipc/LayerTransactionChild.h +++ b/gfx/layers/ipc/LayerTransactionChild.h @@ -70,7 +70,7 @@ protected: virtual bool DeallocPTextureChild(PTextureChild* actor) MOZ_OVERRIDE; virtual bool - RecvParentAsyncMessages(const InfallibleTArray& aMessages) MOZ_OVERRIDE; + RecvParentAsyncMessages(InfallibleTArray&& aMessages) MOZ_OVERRIDE; virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index 8b3fe2577370..55a066fae55c 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -190,7 +190,7 @@ LayerTransactionParent::GetCompositorBackendType() const } bool -LayerTransactionParent::RecvUpdateNoSwap(const InfallibleTArray& cset, +LayerTransactionParent::RecvUpdateNoSwap(InfallibleTArray&& cset, const uint64_t& aTransactionId, const TargetConfig& targetConfig, const bool& isFirstPaint, @@ -199,7 +199,7 @@ LayerTransactionParent::RecvUpdateNoSwap(const InfallibleTArray& cset, const bool& isRepeatTransaction, const mozilla::TimeStamp& aTransactionStart) { - return RecvUpdate(cset, aTransactionId, targetConfig, isFirstPaint, + return RecvUpdate(Move(cset), aTransactionId, targetConfig, isFirstPaint, scheduleComposite, paintSequenceNumber, isRepeatTransaction, aTransactionStart, nullptr); } @@ -220,7 +220,7 @@ private: }; bool -LayerTransactionParent::RecvUpdate(const InfallibleTArray& cset, +LayerTransactionParent::RecvUpdate(InfallibleTArray&& cset, const uint64_t& aTransactionId, const TargetConfig& targetConfig, const bool& isFirstPaint, @@ -878,7 +878,7 @@ LayerTransactionParent::DeallocPTextureParent(PTextureParent* actor) } bool -LayerTransactionParent::RecvChildAsyncMessages(const InfallibleTArray& aMessages) +LayerTransactionParent::RecvChildAsyncMessages(InfallibleTArray&& aMessages) { AutoLayerTransactionParentAsyncMessageSender autoAsyncMessageSender(this); diff --git a/gfx/layers/ipc/LayerTransactionParent.h b/gfx/layers/ipc/LayerTransactionParent.h index a0739091546a..17536e3057d4 100644 --- a/gfx/layers/ipc/LayerTransactionParent.h +++ b/gfx/layers/ipc/LayerTransactionParent.h @@ -103,7 +103,7 @@ public: protected: virtual bool RecvShutdown() MOZ_OVERRIDE; - virtual bool RecvUpdate(const EditArray& cset, + virtual bool RecvUpdate(EditArray&& cset, const uint64_t& aTransactionId, const TargetConfig& targetConfig, const bool& isFirstPaint, @@ -113,7 +113,7 @@ protected: const mozilla::TimeStamp& aTransactionStart, EditReplyArray* reply) MOZ_OVERRIDE; - virtual bool RecvUpdateNoSwap(const EditArray& cset, + virtual bool RecvUpdateNoSwap(EditArray&& cset, const uint64_t& aTransactionId, const TargetConfig& targetConfig, const bool& isFirstPaint, @@ -147,7 +147,7 @@ protected: virtual bool DeallocPTextureParent(PTextureParent* actor) MOZ_OVERRIDE; virtual bool - RecvChildAsyncMessages(const InfallibleTArray& aMessages) MOZ_OVERRIDE; + RecvChildAsyncMessages(InfallibleTArray&& aMessages) MOZ_OVERRIDE; virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp index d19b0375d3b0..2f79c833151a 100644 --- a/hal/sandbox/SandboxHal.cpp +++ b/hal/sandbox/SandboxHal.cpp @@ -502,8 +502,8 @@ public: } virtual bool - RecvVibrate(const InfallibleTArray& pattern, - const InfallibleTArray &id, + RecvVibrate(InfallibleTArray&& pattern, + InfallibleTArray&& id, PBrowserParent *browserParent) MOZ_OVERRIDE { // We give all content vibration permission. @@ -516,7 +516,7 @@ public: } virtual bool - RecvCancelVibrate(const InfallibleTArray &id, + RecvCancelVibrate(InfallibleTArray &&id, PBrowserParent *browserParent) MOZ_OVERRIDE { TabParent *tabParent = static_cast(browserParent); diff --git a/ipc/glue/ProcessUtils_linux.cpp b/ipc/glue/ProcessUtils_linux.cpp index 09d020d86984..659119570fdf 100644 --- a/ipc/glue/ProcessUtils_linux.cpp +++ b/ipc/glue/ProcessUtils_linux.cpp @@ -430,9 +430,9 @@ public: virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; - virtual bool RecvLoad(const InfallibleTArray& aArgv, - const InfallibleTArray& aEnv, - const InfallibleTArray& aFdsremap, + virtual bool RecvLoad(InfallibleTArray&& aArgv, + InfallibleTArray&& aEnv, + InfallibleTArray&& aFdsremap, const uint32_t& aPrivs, const int32_t& aCookie); @@ -453,9 +453,9 @@ _ProcLoaderChildDestroy(ProcLoaderChild *aChild) } bool -ProcLoaderChild::RecvLoad(const InfallibleTArray& aArgv, - const InfallibleTArray& aEnv, - const InfallibleTArray& aFdsRemap, +ProcLoaderChild::RecvLoad(InfallibleTArray&& aArgv, + InfallibleTArray&& aEnv, + InfallibleTArray&& aFdsRemap, const uint32_t& aPrivs, const int32_t& aCookie) { if (!sProcLoaderServing) { diff --git a/ipc/ipdl/ipdl/cxx/ast.py b/ipc/ipdl/ipdl/cxx/ast.py index 7cb8839d8efa..56061c27cfd5 100644 --- a/ipc/ipdl/ipdl/cxx/ast.py +++ b/ipc/ipdl/ipdl/cxx/ast.py @@ -663,6 +663,10 @@ class ExprCall(Node): self.func = func self.args = args +class ExprMove(ExprCall): + def __init__(self, arg): + ExprCall.__init__(self, ExprVar("mozilla::Move"), args=[arg]) + class ExprNew(Node): # XXX taking some poetic license ... def __init__(self, ctype, args=[ ], newargs=None): diff --git a/ipc/ipdl/ipdl/cxx/cgen.py b/ipc/ipdl/ipdl/cxx/cgen.py index 0febdb6ec4ed..5d739e853518 100644 --- a/ipc/ipdl/ipdl/cxx/cgen.py +++ b/ipc/ipdl/ipdl/cxx/cgen.py @@ -47,7 +47,7 @@ class CxxCodeGen(CodePrinter, Visitor): elif t.ptrptr: ts += '**' elif t.ptrconstptr: ts += '* const*' - if t.ref: ts += '&' + ts += '&' * t.ref self.write(ts) @@ -357,6 +357,9 @@ class CxxCodeGen(CodePrinter, Visitor): self.writeExprList(ec.args) self.write(')') + def visitExprMove(self, em): + self.visitExprCall(em) + def visitExprNew(self, en): self.write('new ') if en.newargs is not None: diff --git a/ipc/ipdl/ipdl/lower.py b/ipc/ipdl/ipdl/lower.py index 031b15e14ed1..3a6a9d67737c 100644 --- a/ipc/ipdl/ipdl/lower.py +++ b/ipc/ipdl/ipdl/lower.py @@ -548,6 +548,13 @@ def _cxxConstRefType(ipdltype, side): t.ref = 1 return t +def _cxxMoveRefType(ipdltype, side): + t = _cxxBareType(ipdltype, side) + if ipdltype.isIPDL() and (ipdltype.isArray() or ipdltype.isShmem()): + t.ref = 2 + return t + return _cxxConstRefType(ipdltype, side) + def _cxxPtrToType(ipdltype, side): t = _cxxBareType(ipdltype, side) if ipdltype.isIPDL() and ipdltype.isActor(): @@ -602,6 +609,10 @@ necessarily a C++ reference.""" """Return this decl's C++ type as a const, 'reference' type.""" return _cxxConstRefType(self.ipdltype, side) + def rvalueRefType(self, side): + """Return this decl's C++ type as an r-value 'reference' type.""" + return _cxxMoveRefType(self.ipdltype, side) + def ptrToType(self, side): return _cxxPtrToType(self.ipdltype, side) @@ -614,6 +625,12 @@ necessarily a C++ reference.""" return self.bareType(side) return self.constRefType(side) + def moveType(self, side): + """Return this decl's C++ Type with move semantics.""" + if self.ipdltype.isIPDL() and self.ipdltype.isActor(): + return self.bareType(side) + return self.rvalueRefType(side); + def outType(self, side): """Return this decl's C++ Type with outparam semantics.""" t = self.bareType(side) @@ -939,6 +956,8 @@ class MessageDecl(ipdl.ast.MessageDecl): def makeDecl(d, sems): if sems is 'in': return Decl(d.inType(side), d.name) + elif sems is 'move': + return Decl(d.moveType(side), d.name) elif sems is 'out': return Decl(d.outType(side), d.name) else: assert 0 @@ -962,7 +981,7 @@ class MessageDecl(ipdl.ast.MessageDecl): cxxargs = [ ] if params: - cxxargs.extend([ p.var() for p in self.params ]) + cxxargs.extend([ ExprMove(p.var()) for p in self.params ]) for ret in self.returns: if retsems is 'in': @@ -2809,7 +2828,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): implicit = (not isdtor) recvDecl = MethodDecl( md.recvMethod().name, - params=md.makeCxxParams(paramsems='in', returnsems='out', + params=md.makeCxxParams(paramsems='move', returnsems='out', side=self.side, implicit=implicit), ret=Type.BOOL, virtual=1) diff --git a/js/ipc/JavaScriptBase.h b/js/ipc/JavaScriptBase.h index 2ae230bb0f7a..7ecc591e2e91 100644 --- a/js/ipc/JavaScriptBase.h +++ b/js/ipc/JavaScriptBase.h @@ -84,10 +84,10 @@ class JavaScriptBase : public WrapperOwner, public WrapperAnswer, public Base bool *result) { return Answer::RecvIsExtensible(ObjectId::deserialize(objId), rs, result); } - bool RecvCallOrConstruct(const uint64_t &objId, const nsTArray &argv, - const bool &construct, ReturnStatus *rs, JSVariant *result, - nsTArray *outparams) { - return Answer::RecvCallOrConstruct(ObjectId::deserialize(objId), argv, construct, rs, result, outparams); + bool RecvCallOrConstruct(const uint64_t &objId, InfallibleTArray &&argv, + const bool &construct, ReturnStatus *rs, JSVariant *result, + nsTArray *outparams) { + return Answer::RecvCallOrConstruct(ObjectId::deserialize(objId), Move(argv), construct, rs, result, outparams); } bool RecvHasInstance(const uint64_t &objId, const JSVariant &v, ReturnStatus *rs, bool *bp) { return Answer::RecvHasInstance(ObjectId::deserialize(objId), v, rs, bp); diff --git a/js/ipc/WrapperAnswer.cpp b/js/ipc/WrapperAnswer.cpp index c9ff9059a35b..21a4d3399bd6 100644 --- a/js/ipc/WrapperAnswer.cpp +++ b/js/ipc/WrapperAnswer.cpp @@ -387,7 +387,7 @@ WrapperAnswer::RecvIsExtensible(const ObjectId &objId, ReturnStatus *rs, bool *r bool WrapperAnswer::RecvCallOrConstruct(const ObjectId &objId, - const nsTArray &argv, + InfallibleTArray &&argv, const bool &construct, ReturnStatus *rs, JSVariant *result, diff --git a/js/ipc/WrapperAnswer.h b/js/ipc/WrapperAnswer.h index 772416abb2b8..b35de2dbf6cd 100644 --- a/js/ipc/WrapperAnswer.h +++ b/js/ipc/WrapperAnswer.h @@ -46,7 +46,7 @@ class WrapperAnswer : public virtual JavaScriptShared bool RecvIsExtensible(const ObjectId &objId, ReturnStatus *rs, bool *result); - bool RecvCallOrConstruct(const ObjectId &objId, const nsTArray &argv, + bool RecvCallOrConstruct(const ObjectId &objId, InfallibleTArray &&argv, const bool &construct, ReturnStatus *rs, JSVariant *result, nsTArray *outparams); bool RecvHasInstance(const ObjectId &objId, const JSVariant &v, ReturnStatus *rs, bool *bp); diff --git a/netwerk/protocol/rtsp/controller/RtspControllerChild.cpp b/netwerk/protocol/rtsp/controller/RtspControllerChild.cpp index 38660e9c9724..9655e46c2591 100644 --- a/netwerk/protocol/rtsp/controller/RtspControllerChild.cpp +++ b/netwerk/protocol/rtsp/controller/RtspControllerChild.cpp @@ -136,7 +136,7 @@ RtspControllerChild::RecvOnMediaDataAvailable( const nsCString& data, const uint32_t& length, const uint32_t& offset, - const InfallibleTArray& metaArray) + InfallibleTArray&& metaArray) { nsRefPtr meta = new RtspMetaData(); nsresult rv = meta->DeserializeRtspMetaData(metaArray); @@ -164,7 +164,7 @@ RtspControllerChild::GetMetaDataLength() bool RtspControllerChild::RecvOnConnected( const uint8_t& index, - const InfallibleTArray& metaArray) + InfallibleTArray&& metaArray) { // Deserialize meta data. nsRefPtr meta = new RtspMetaData(); diff --git a/netwerk/protocol/rtsp/controller/RtspControllerChild.h b/netwerk/protocol/rtsp/controller/RtspControllerChild.h index febae6ae21af..fffc8d3f8eff 100644 --- a/netwerk/protocol/rtsp/controller/RtspControllerChild.h +++ b/netwerk/protocol/rtsp/controller/RtspControllerChild.h @@ -33,14 +33,14 @@ class RtspControllerChild : public nsIStreamingProtocolController ~RtspControllerChild(); bool RecvOnConnected(const uint8_t& index, - const InfallibleTArray& meta); + InfallibleTArray&& meta); bool RecvOnMediaDataAvailable( const uint8_t& index, const nsCString& data, const uint32_t& length, const uint32_t& offset, - const InfallibleTArray& meta); + InfallibleTArray&& meta); bool RecvOnDisconnected(const uint8_t& index, const nsresult& reason);