Bug 1547203 - Don't expose CTypes with --fuzzing-safe in JS shell. r=jandem
authorChristian Holler <choller@mozilla.com>
Fri, 26 Apr 2019 09:19:12 +0000
changeset 530280 658653e0290cb28bb431e0947f629d39d4f9a34c
parent 530279 f4188146536b4c05b79ab3440854acfc461c9f76
child 530281 f35cf62b01a185a3cf8120ac340a347bb23dccf0
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1547203
milestone68.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 1547203 - Don't expose CTypes with --fuzzing-safe in JS shell. r=jandem Differential Revision: https://phabricator.services.mozilla.com/D28961
js/src/shell/js.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -9910,17 +9910,17 @@ static JSObject* NewGlobalObject(JSConte
     if (!JS_SetImmutablePrototype(cx, glob, &succeeded)) {
       return nullptr;
     }
     MOZ_ASSERT(succeeded,
                "a fresh, unexposed global object is always capable of "
                "having its [[Prototype]] be immutable");
 
 #ifdef JS_HAS_CTYPES
-    if (!JS_InitCTypesClass(cx, glob)) {
+    if (!fuzzingSafe && !JS_InitCTypesClass(cx, glob)) {
       return nullptr;
     }
 #endif
     if (!JS_InitReflectParse(cx, glob)) {
       return nullptr;
     }
     if (!JS_DefineDebuggerObject(cx, glob)) {
       return nullptr;