| Summary: | regExpProtoFuncExec and operationRegExpExecGeneric throw different messages when thisObject is not a RegExp object | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | ChristineWillice <ChristineWillice> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | mark.lam, msaboff, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Pull request: https://github.com/WebKit/WebKit/pull/28444 Committed 278663@main (9d09c5e0ff19): <https://commits.webkit.org/278663@main> Reviewed commits have been landed. Closing PR #28444 and removing active labels. |
``````test.js`````` for (let v0 = 0; v0 < 40; v0++) { let v16 = RegExp.prototype try { v16.test(); } catch (e23) { print(e23) } } ``````````````````` Run args: ./jsc -f test.js --useConcurrentJIT=0 --jitPolicyScale=0 Output: TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error When thisObject is not a RegExp object: In RegExpPrototype.cpp, regExpProtoFuncExec throw `Builtin RegExp exec can only be called on a RegExp object`, In DFGOperations.cpp, operationRegExpExecGeneric throw `Type error`.