Bug 258559

Summary: regExpProtoFuncExec and operationRegExpExecGeneric throw different messages when thisObject is not a RegExp object
Product: WebKit Reporter: ChristineWillice <ChristineWillice>
Component: JavaScriptCoreAssignee: 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   

ChristineWillice
Reported 2023-06-27 04:57:47 PDT
``````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`.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-07-04 04:58:16 PDT
Sosuke Suzuki
Comment 2 2024-05-12 09:21:14 PDT
EWS
Comment 3 2024-05-12 12:58:12 PDT
Committed 278663@main (9d09c5e0ff19): <https://commits.webkit.org/278663@main> Reviewed commits have been landed. Closing PR #28444 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.