Bug 819791 - Part 5: Remove an unnecessary TArray copy in hal/sandbox. r=mounir
authorJustin Lebar <justin.lebar@gmail.com>
Tue, 18 Dec 2012 20:16:06 -0500
changeset 116481 160c727a336b0dd9b33183f46201488d92414716
parent 116480 3877a7a5fdf6040adf950d3a367971862dda252c
child 116482 269b0c198fdb028adf981e2b0d81bf2c9ca7c46f
push id24052
push useremorley@mozilla.com
push dateWed, 19 Dec 2012 19:30:46 +0000
treeherdermozilla-central@27a1c1839d42 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs819791
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 819791 - Part 5: Remove an unnecessary TArray copy in hal/sandbox. r=mounir
hal/sandbox/SandboxHal.cpp
--- a/hal/sandbox/SandboxHal.cpp
+++ b/hal/sandbox/SandboxHal.cpp
@@ -432,18 +432,17 @@ public:
               const InfallibleTArray<uint64_t> &id,
               PBrowserParent *browserParent) MOZ_OVERRIDE
   {
     // We give all content vibration permission.
     TabParent *tabParent = static_cast<TabParent*>(browserParent);
     nsCOMPtr<nsIDOMWindow> window =
       do_QueryInterface(tabParent->GetBrowserDOMWindow());
     WindowIdentifier newID(id, window);
-    // Have to copy, because Vibrate doesn't take a compatible array type
-    hal::Vibrate(nsTArray<uint32_t>(pattern), newID);
+    hal::Vibrate(pattern, newID);
     return true;
   }
 
   virtual bool
   RecvCancelVibrate(const InfallibleTArray<uint64_t> &id,
                     PBrowserParent *browserParent) MOZ_OVERRIDE
   {
     TabParent *tabParent = static_cast<TabParent*>(browserParent);