mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 13:51:47 +00:00
fix bugs found by exception scope verification (#20285)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
This commit is contained in:
@@ -158,6 +158,7 @@ JSC_DEFINE_CUSTOM_SETTER(jsSetter_INSPECT_MAX_BYTES, (JSGlobalObject * lexicalGl
|
||||
DEFINE_NATIVE_MODULE(NodeBuffer)
|
||||
{
|
||||
INIT_NATIVE_MODULE(12);
|
||||
auto scope = DECLARE_THROW_SCOPE(vm);
|
||||
|
||||
put(JSC::Identifier::fromString(vm, "Buffer"_s), globalObject->JSBufferConstructor());
|
||||
|
||||
@@ -192,9 +193,11 @@ DEFINE_NATIVE_MODULE(NodeBuffer)
|
||||
|
||||
JSC::Identifier atobI = JSC::Identifier::fromString(vm, "atob"_s);
|
||||
JSC::JSValue atobV = lexicalGlobalObject->get(globalObject, PropertyName(atobI));
|
||||
RETURN_IF_EXCEPTION(scope, );
|
||||
|
||||
JSC::Identifier btoaI = JSC::Identifier::fromString(vm, "btoa"_s);
|
||||
JSC::JSValue btoaV = lexicalGlobalObject->get(globalObject, PropertyName(btoaI));
|
||||
RETURN_IF_EXCEPTION(scope, );
|
||||
|
||||
put(atobI, atobV);
|
||||
put(btoaI, btoaV);
|
||||
|
||||
Reference in New Issue
Block a user