diff options
author | 2022-11-02 19:25:52 -0700 | |
---|---|---|
committer | 2022-11-02 19:25:52 -0700 | |
commit | 35ba83584f79808a51193812ab7715b339d9dcb4 (patch) | |
tree | acb4b15e4d109441cfde56a52346dabb31ed0581 /src | |
parent | 50cf08366870d5f2ccce3c3c79fb0571abcec676 (diff) | |
download | bun-35ba83584f79808a51193812ab7715b339d9dcb4.tar.gz bun-35ba83584f79808a51193812ab7715b339d9dcb4.tar.zst bun-35ba83584f79808a51193812ab7715b339d9dcb4.zip |
Fixes #1448 #1450
Diffstat (limited to 'src')
-rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 4ef773995..0bcaaa732 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -2737,9 +2737,7 @@ void GlobalObject::installAPIGlobals(JSClassRef* globals, int count, JSC::VM& vm Crypto__randomUUID__put(this, JSValue::encode(object)); object->putDirectCustomAccessor(vm, JSC::Identifier::fromString(vm, "subtle"_s), JSC::CustomGetterSetter::create(vm, getterSubtleCrypto, nullptr), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontDelete | 0); - extraStaticGlobals.uncheckedAppend( - GlobalPropertyInfo { JSC::Identifier::fromString(vm, jsClass->className()), - JSC::JSValue(object), JSC::PropertyAttribute::DontDelete | 0 }); + this->putDirect(vm, JSC::Identifier::fromString(vm, "Crypto"_s), object, JSC::PropertyAttribute::DontDelete | 0); } for (j = 2; j < count - 1; j++) { @@ -2750,9 +2748,7 @@ void GlobalObject::installAPIGlobals(JSClassRef* globals, int count, JSC::VM& vm if (JSObject* prototype = object->classRef()->prototype(this)) object->setPrototypeDirect(vm, prototype); - extraStaticGlobals.uncheckedAppend( - GlobalPropertyInfo { JSC::Identifier::fromString(vm, jsClass->className()), - JSC::JSValue(object), JSC::PropertyAttribute::DontDelete | 0 }); + this->putDirect(vm, JSC::Identifier::fromString(vm, jsClass->className()), JSC::JSValue(object), JSC::PropertyAttribute::DontDelete | 0); } // The last one must be "process.env" |