mirror of
https://github.com/bellard/quickjs.git
synced 2025-05-12 19:14:39 +08:00
fixed RegExp.prototype[Symbol.split]
This commit is contained in:
parent
1e958abcd8
commit
b32cccb5fe
@ -44957,7 +44957,7 @@ static JSValue js_regexp_Symbol_split(JSContext *ctx, JSValueConst this_val,
|
|||||||
if (js_get_length64(ctx, &numberOfCaptures, z))
|
if (js_get_length64(ctx, &numberOfCaptures, z))
|
||||||
goto exception;
|
goto exception;
|
||||||
for(i = 1; i < numberOfCaptures; i++) {
|
for(i = 1; i < numberOfCaptures; i++) {
|
||||||
sub = JS_ToStringFree(ctx, JS_GetPropertyInt64(ctx, z, i));
|
sub = JS_GetPropertyInt64(ctx, z, i);
|
||||||
if (JS_IsException(sub))
|
if (JS_IsException(sub))
|
||||||
goto exception;
|
goto exception;
|
||||||
if (JS_DefinePropertyValueInt64(ctx, A, lengthA++, sub, JS_PROP_C_W_E | JS_PROP_THROW) < 0)
|
if (JS_DefinePropertyValueInt64(ctx, A, lengthA++, sub, JS_PROP_C_W_E | JS_PROP_THROW) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user