Bug 233253

Summary: [GLIB] jsc_value_object_define_property_accessor() throws an exception when called on a value without a wrapper instance
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bugs-noreply, ews-watchlist, keith_miller, mark.lam, mcatanzaro, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mcatanzaro: review+

Description Carlos Garcia Campos 2021-11-17 06:51:15 PST
We assumed that getter and setter were always methods, so we always try to set the initial parameter as the instance. When called with a value ot having an instance we get an exception because the expected instance is nullptr.
Comment 1 Carlos Garcia Campos 2021-11-17 06:55:36 PST
Created attachment 444514 [details]
Patch
Comment 2 Michael Catanzaro 2021-11-17 07:43:34 PST
Comment on attachment 444514 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=444514&action=review

Nice tests.

> Source/JavaScriptCore/ChangeLog:9
> +        instance. When called with a value ot having an instance we get an exception because the expected instance is

not
Comment 3 Carlos Garcia Campos 2021-11-18 01:26:11 PST
Committed r285988 (244385@main): <https://commits.webkit.org/244385@main>
Comment 4 Radar WebKit Bug Importer 2021-11-18 01:27:21 PST
<rdar://problem/85540530>