mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
In-regExp useCache error
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9KVN8 Signed-off-by: jiachong <jiachong6@huawei.com> Change-Id: Iabd9c03984a9023d924cba8f61642e4f0462ef15
This commit is contained in:
parent
fe6e41c3c7
commit
4bf5b6bfbf
@ -999,6 +999,7 @@ JSTaggedValue BuiltinsRegExp::ReplaceInternal(JSThread *thread,
|
||||
}
|
||||
} else {
|
||||
// 9. ReturnIfAbrupt(global).
|
||||
useCache = false;
|
||||
isGlobal = GetFlag(thread, thisObj, RegExpParser::FLAG_GLOBAL, isFastPath);
|
||||
RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread);
|
||||
// 10. If global is true, then
|
||||
|
@ -145,3 +145,4 @@ null
|
||||
[object Object]
|
||||
false
|
||||
false
|
||||
success
|
||||
|
@ -614,4 +614,13 @@ delete e.exec;
|
||||
for (let v3 = 0; v3 < 2; v3++) {
|
||||
print(v2.test(-194290175n));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function f(...args) {
|
||||
return {};
|
||||
}
|
||||
let reg51 = new RegExp("a");
|
||||
f.exec = f;
|
||||
let relpfun = reg51[Symbol.replace];
|
||||
relpfun.apply(f, [1, 2, 3, 4]);
|
||||
print("success");
|
Loading…
Reference in New Issue
Block a user