Bug 260750 - Placate exception check validation in sanitizeRemoteFunctionException.
Summary: Placate exception check validation in sanitizeRemoteFunctionException.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-25 17:11 PDT by Mark Lam
Modified: 2023-08-25 18:13 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.