Skip to content

Commit

Permalink
PR feedback from #15865
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Dec 19, 2024
1 parent ac6723e commit 42f23f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bun.js/bindings/NodeVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ bool NodeVMGlobalObject::put(JSCell* cell, JSGlobalObject* globalObject, Propert
}
RETURN_IF_EXCEPTION(scope, false);

slot.setThisValue(sandbox);
if (isDeclaredOnSandbox && getter.isAccessor() and (getter.attributes() & PropertyAttribute::DontEnum) == 0) {
return true;
}
Expand Down Expand Up @@ -553,8 +552,10 @@ JSC_DEFINE_HOST_FUNCTION(vmModuleRunInNewContext, (JSGlobalObject * globalObject
NakedPtr<Exception> exception;
JSValue result = JSC::evaluate(context, sourceCode, context, exception);

if (exception)
if (exception) {
throwException(globalObject, scope, exception);
return {};
}

return JSValue::encode(result);
}
Expand Down

0 comments on commit 42f23f0

Please sign in to comment.