Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions core/00_primordials.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,19 @@
},
);

primordials.ArrayPrototypePush = (thisArray, ...variableArgs) => {
const args = [...variableArgs];
for (let i = 0; i < args.length; i++) {
ObjectDefineProperty(thisArray, thisArray.length, {
value: args[i],
enumerable: true,
writable: true,
configurable: true,
});
}
return thisArray.length;
};

primordials.ArrayPrototypeToString = (thisArray) =>
ArrayPrototypeJoin(thisArray);

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

// This test refers to the issue.
// https://github.com/denoland/deno_core/issues/744

Object.prototype.__defineSetter__(0, function () {});

// Need to dare to make errors.
// For example, `ReferenceError: variable is not defined`.
variable;
1 change: 1 addition & 0 deletions testing/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ integration_test!(
error_rejection_catch,
error_rejection_order,
error_ext_stack,
error_internal_method_set,
error_with_stack,
error_without_stack,
main_module_handler,
Expand Down