Skip to content

Commit 8b2a124

Browse files
author
Fabrice Bellard
committed
fixed Regexp.prototype[Symbol.match]
1 parent 071a4cf commit 8b2a124

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

quickjs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45369,7 +45369,7 @@ static JSValue js_regexp_Symbol_match(JSContext *ctx, JSValueConst this_val,
4536945369
if (JS_IsException(matchStr))
4537045370
goto exception;
4537145371
isEmpty = JS_IsEmptyString(matchStr);
45372-
if (JS_SetPropertyInt64(ctx, A, n++, matchStr) < 0)
45372+
if (JS_DefinePropertyValueInt64(ctx, A, n++, matchStr, JS_PROP_C_W_E | JS_PROP_THROW) < 0)
4537345373
goto exception;
4537445374
if (isEmpty) {
4537545375
int64_t thisIndex, nextIndex;

test262_errors.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ test262/test/staging/sm/RegExp/constructor-ordering-2.js:15: Test262Error: Expec
1717
test262/test/staging/sm/RegExp/regress-613820-1.js:13: Test262Error: Expected SameValue(«"aaa"», «"aa"») to be true
1818
test262/test/staging/sm/RegExp/regress-613820-2.js:13: Test262Error: Expected SameValue(«"f"», «undefined») to be true
1919
test262/test/staging/sm/RegExp/regress-613820-3.js:13: Test262Error: Expected SameValue(«"aab"», «"aa"») to be true
20-
test262/test/staging/sm/String/match-defines-match-elements.js:52: Test262Error: Expected SameValue(«true», «false») to be true
2120
test262/test/staging/sm/TypedArray/constructor-buffer-sequence.js:73: Error: Assertion failed: expected exception ExpectedError, got Error: Poisoned Value
2221
test262/test/staging/sm/TypedArray/prototype-constructor-identity.js:17: Test262Error: Expected SameValue(«2», «6») to be true
2322
test262/test/staging/sm/TypedArray/set-detached-bigint.js:27: Error: Assertion failed: expected exception SyntaxError, got RangeError: invalid array length

0 commit comments

Comments
 (0)