Bug 260750

Summary: Placate exception check validation in sanitizeRemoteFunctionException.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Mark Lam 2023-08-25 17:11:54 PDT
sanitizeRemoteFunctionException() can call JSValue::toWTFString() which may throw under certain circumstances.  However, it is only called here if exceptionValue.isPrimitive() i.e. it will never throw.  However, the exception check validator does not know this.  So, we added a `ASSERT(!scope.exception())` to placate it.  

However, if we're forcing exception check validation on a Release build, the ASSERT turns into a no-op.  The fix is to use EXCEPTION_ASSERT here instead.
Comment 1 Radar WebKit Bug Importer 2023-08-25 17:12:15 PDT
<rdar://problem/114477714>
Comment 2 Mark Lam 2023-08-25 17:15:33 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17093
Comment 3 EWS 2023-08-25 18:13:21 PDT
Committed 267311@main (9b124cc4e156): <https://commits.webkit.org/267311@main>

Reviewed commits have been landed. Closing PR #17093 and removing active labels.