Bug 233253 - [GLIB] jsc_value_object_define_property_accessor() throws an exception when called on a value without a wrapper instance
Summary: [GLIB] jsc_value_object_define_property_accessor() throws an exception when c...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-17 06:51 PST by Carlos Garcia Campos
Modified: 2021-11-18 01:27 PST (History)
10 users (show)

See Also:


Attachments
Patch (20.47 KB, patch)
2021-11-17 06:55 PST, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

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