diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp index a2093b5959c1..7b58c53d76dd 100644 --- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -93,16 +93,18 @@ js::GlobalObject::getTypedObjectModule() const { /* static */ bool GlobalObject::skipDeselectedConstructor(JSContext* cx, JSProtoKey key) { +#ifdef ENABLE_SHARED_ARRAY_BUFFER // Return true if the given constructor has been disabled at run-time. switch (key) { -#ifdef ENABLE_SHARED_ARRAY_BUFFER case JSProto_Atomics: case JSProto_SharedArrayBuffer: return !cx->compartment()->creationOptions().getSharedMemoryAndAtomicsEnabled(); -#endif default: return false; } +#else + return false; +#endif } /* static */ bool