Skip to content

Commit

Permalink
+13 passing node:vm tests (#15865)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner authored Dec 19, 2024
1 parent 8e20d02 commit ac6723e
Show file tree
Hide file tree
Showing 24 changed files with 1,178 additions and 266 deletions.
2 changes: 2 additions & 0 deletions src/bun.js/bindings/BunClientData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "JSDOMWrapper.h"
#include <JavaScriptCore/DeferredWorkTimer.h>
#include "NodeVM.h"

namespace WebCore {
using namespace JSC;
Expand All @@ -30,6 +31,7 @@ RefPtr<JSC::SourceProvider> createBuiltinsSourceProvider();

JSHeapData::JSHeapData(Heap& heap)
: m_heapCellTypeForJSWorkerGlobalScope(JSC::IsoHeapCellType::Args<Zig::GlobalObject>())
, m_heapCellTypeForNodeVMGlobalObject(JSC::IsoHeapCellType::Args<Bun::NodeVMGlobalObject>())
, m_domBuiltinConstructorSpace ISO_SUBSPACE_INIT(heap, heap.cellHeapCellType, JSDOMBuiltinConstructorBase)
, m_domConstructorSpace ISO_SUBSPACE_INIT(heap, heap.cellHeapCellType, JSDOMConstructorBase)
, m_domNamespaceObjectSpace ISO_SUBSPACE_INIT(heap, heap.cellHeapCellType, JSDOMObject)
Expand Down
1 change: 1 addition & 0 deletions src/bun.js/bindings/BunClientData.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class JSHeapData {
}

JSC::IsoHeapCellType m_heapCellTypeForJSWorkerGlobalScope;
JSC::IsoHeapCellType m_heapCellTypeForNodeVMGlobalObject;

private:
Lock m_lock;
Expand Down
1 change: 0 additions & 1 deletion src/bun.js/bindings/ErrorCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ JSC_DEFINE_HOST_FUNCTION(Bun::jsFunctionMakeErrorWithCode, (JSC::JSGlobalObject

return JSValue::encode(ERR_INVALID_ARG_TYPE(scope, globalObject, arg0, arg1, arg2));
}

default: {
break;
}
Expand Down
2 changes: 2 additions & 0 deletions src/bun.js/bindings/ErrorCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export default [
["ERR_STREAM_RELEASE_LOCK", Error, "AbortError"],
["ERR_INCOMPATIBLE_OPTION_PAIR", TypeError, "TypeError"],
["ERR_INVALID_URI", URIError, "URIError"],
["ERR_SCRIPT_EXECUTION_TIMEOUT", Error, "Error"],
["ERR_SCRIPT_EXECUTION_INTERRUPTED", Error, "Error"],

// Bun-specific
["ERR_FORMDATA_PARSE_ERROR", TypeError],
Expand Down
Loading

0 comments on commit ac6723e

Please sign in to comment.