Import Cobalt 4.12959
diff --git a/src/third_party/mozjs/mozjs.gyp b/src/third_party/mozjs/mozjs.gyp
index bede0e6..8895e64 100644
--- a/src/third_party/mozjs/mozjs.gyp
+++ b/src/third_party/mozjs/mozjs.gyp
@@ -66,6 +66,12 @@
           'JS_NUNBOX32=1',
         ],
       }],
+      [ 'target_arch == "mips"', {
+        'defines': [
+          'JS_CPU_MIPS=1',
+          'JS_NUNBOX32=1',
+        ],
+      }],
       [ 'cobalt_enable_jit == 1', {
         'defines': [
           '<@(common_jit_defines)',
@@ -76,6 +82,12 @@
           'MOZ_ASAN',
         ],
       }],
+      [ 'cobalt_config == "debug"', {
+        'defines': [
+          'DEBUG',
+          'JS_DEBUG',
+        ],
+      }],
     ],
   },
   'targets': [
@@ -165,6 +177,21 @@
             '<@(mozjs_jit_sources)',
           ],
         }],
+        [ 'target_arch == "mips" and cobalt_enable_jit == 1', {
+          'sources': [
+            'js/src/jit/mips/Architecture-mips.cpp',
+            'js/src/jit/mips/Assembler-mips.cpp',
+            'js/src/jit/mips/Bailouts-mips.cpp',
+            'js/src/jit/mips/BaselineCompiler-mips.cpp',
+            'js/src/jit/mips/BaselineIC-mips.cpp',
+            'js/src/jit/mips/CodeGenerator-mips.cpp',
+            'js/src/jit/mips/Lowering-mips.cpp',
+            'js/src/jit/mips/MacroAssembler-mips.cpp',
+            'js/src/jit/mips/MoveEmitter-mips.cpp',
+            'js/src/jit/mips/Trampoline-mips.cpp',
+            '<@(mozjs_jit_sources)',
+          ]
+        }]
       ],
       'dependencies': [
         'build_include_directory',