Bug 1344074 - Make sure ParamTraits<mozilla::Array<T, Length>>::Read use the correct type. r=mattwoodrow, a=lizzard
authorKan-Ru Chen <kanru@kanru.info>
Fri, 03 Mar 2017 19:46:00 +0800
changeset 376623 9a08c0317d188d67b593a20e96da25b380b4f2fb
parent 376622 4b6a130cc3424f17b07220bd23c2c70c4f32e860
child 376624 abc24cf07fc9aaf416f5efabb808d60363120816
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, lizzard
bugs1344074
milestone53.0a2
Bug 1344074 - Make sure ParamTraits<mozilla::Array<T, Length>>::Read use the correct type. r=mattwoodrow, a=lizzard MozReview-Commit-ID: Id4pvQJe6A4
gfx/ipc/GfxMessageUtils.h
--- a/gfx/ipc/GfxMessageUtils.h
+++ b/gfx/ipc/GfxMessageUtils.h
@@ -1319,17 +1319,17 @@ struct ParamTraits<mozilla::Array<T, Len
   static void Write(Message* aMsg, const paramType& aParam) {
     for (size_t i = 0; i < Length; i++) {
       WriteParam(aMsg, aParam[i]);
     }
   }
 
   static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) {
     for (size_t i = 0; i < Length; i++) {
-      if (!ReadParam(aMsg, aIter, &aResult[i])) {
+      if (!ReadParam<T>(aMsg, aIter, &aResult->operator[](i))) {
         return false;
       }
     }
     return true;
   }
 };
 
 template <>