1diff --git a/media/libyuv/libyuv/include/libyuv/basic_types.h b/media/libyuv/libyuv/include/libyuv/basic_types.h
2--- a/media/libyuv/libyuv/include/libyuv/basic_types.h
3+++ b/media/libyuv/libyuv/include/libyuv/basic_types.h
4@@ -14,16 +14,32 @@
5 #include <stddef.h>  // for NULL, size_t
6
7 #if defined(_MSC_VER) && (_MSC_VER < 1600)
8 #include <sys/types.h>  // for uintptr_t on x86
9 #else
10 #include <stdint.h>  // for uintptr_t
11 #endif
12
13+typedef uint64_t uint64;
14+typedef int64_t  int64;
15+#if defined(_MSC_VER)
16+// nsprpub/pr/include/obsolete/protypes.h defines these weirdly
17+typedef long int32;
18+typedef unsigned long uint32;
19+#else
20+typedef uint32_t uint32;
21+typedef int32_t  int32;
22+#endif
23+typedef uint16_t uint16;
24+typedef int16_t  int16;
25+typedef uint8_t  uint8;
26+typedef int8_t   int8;
27+#define INT_TYPES_DEFINED 1
28+
29 #ifndef GG_LONGLONG
30 #ifndef INT_TYPES_DEFINED
31 #define INT_TYPES_DEFINED
32 #ifdef COMPILER_MSVC
33 typedef unsigned __int64 uint64;
34 typedef __int64 int64;
35 #ifndef INT64_C
36 #define INT64_C(x) x##I64
37diff --git a/media/libyuv/libyuv/include/libyuv/row.h b/media/libyuv/libyuv/include/libyuv/row.h
38--- a/media/libyuv/libyuv/include/libyuv/row.h
39+++ b/media/libyuv/libyuv/include/libyuv/row.h
40@@ -169,18 +169,19 @@ extern "C" {
41 #define HAS_SOBELROW_SSE2
42 #define HAS_SOBELTOPLANEROW_SSE2
43 #define HAS_SOBELXROW_SSE2
44 #define HAS_SOBELXYROW_SSE2
45 #define HAS_SOBELYROW_SSE2
46
47 // The following functions fail on gcc/clang 32 bit with fpic and framepointer.
48 // caveat: clangcl uses row_win.cc which works.
49-#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
50-    defined(_MSC_VER)
51+#if !defined(MOZ_PROFILING) && \
52+  (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) ||  \
53+   defined(_MSC_VER))
54 // TODO(fbarchard): fix build error on android_full_debug=1
55 // https://code.google.com/p/libyuv/issues/detail?id=517
56 #define HAS_I422ALPHATOARGBROW_SSSE3
57 #endif
58 #endif
59
60 // The following are available on all x86 platforms, but
61 // require VS2012, clang 3.4 or gcc 4.7.
62@@ -231,18 +232,19 @@ extern "C" {
63 // Effects:
64 #define HAS_ARGBADDROW_AVX2
65 #define HAS_ARGBATTENUATEROW_AVX2
66 #define HAS_ARGBMULTIPLYROW_AVX2
67 #define HAS_ARGBSUBTRACTROW_AVX2
68 #define HAS_ARGBUNATTENUATEROW_AVX2
69 #define HAS_BLENDPLANEROW_AVX2
70
71-#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
72-    defined(_MSC_VER)
73+#if !defined(MOZ_PROFILING) && \
74+  (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) ||  \
75+   defined(_MSC_VER))
76 // TODO(fbarchard): fix build error on android_full_debug=1
77 // https://code.google.com/p/libyuv/issues/detail?id=517
78 #define HAS_I422ALPHATOARGBROW_AVX2
79 #endif
80 #endif
81
82 // The following are available for AVX2 Visual C and clangcl 32 bit:
83 // TODO(fbarchard): Port to gcc.
84