Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion Jint.Tests.Test262/Test262Harness.settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"SuiteGitSha": "1a51ced90ea552ffd90450d234ebb426f134fa93",
"SuiteGitSha": "5c8206929d81b2d3d727ca6aac56c18358c8d790",
//"SuiteDirectory": "//mnt/c/work/test262",
"TargetPath": "./Generated",
"Namespace": "Jint.Tests.Test262",
"Parallel": true,
"ExcludedFeatures": [
"import-defer",
"import-text",
"regexp-unicode-property-escapes",
"regexp-v-flag",
"source-phase-imports",
Expand Down
13 changes: 12 additions & 1 deletion Jint/Native/Disposable/AsyncDisposableStackPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Jint.Native.Object;
using Jint.Native.Promise;
using Jint.Native.Symbol;
using Jint.Runtime;
using Jint.Runtime.Descriptors;
Expand Down Expand Up @@ -62,7 +63,17 @@ private JsValue Defer(JsValue thisObject, JsCallArguments arguments)
private JsValue Dispose(JsValue thisObject, JsCallArguments arguments)
{
var stack = AssertDisposableStack(thisObject);
return stack.Dispose();
var capability = PromiseConstructor.NewPromiseCapability(_engine, _engine.Realm.Intrinsics.Promise);
try
{
var result = stack.Dispose();
capability.Resolve.Call(Undefined, result);
}
catch (JavaScriptException e)
{
capability.Reject.Call(Undefined, e.Error);
}
return capability.PromiseInstance;
}

private JsValue Disposed(JsValue thisObject, JsCallArguments arguments)
Expand Down
3 changes: 2 additions & 1 deletion Jint/Native/Temporal/Instant/InstantPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,10 @@ private JsInstant Round(JsValue thisObject, JsCallArguments arguments)
ObjectInstance roundToObj;

// Step 4: If roundTo is a string, treat as { smallestUnit: roundTo }
// Per spec, the synthetic options object must have null prototype to avoid Object.prototype pollution
if (roundTo.IsString())
{
roundToObj = new JsObject(_engine);
roundToObj = ObjectInstance.OrdinaryObjectCreate(_engine, null);
roundToObj.Set("smallestUnit", roundTo);
}
// Step 5: Else, GetOptionsObject (must be an object)
Expand Down