Bug 212458 - CodeGenerator should use DOMAttributeGetterSetter when it is DOMAttribute
Summary: CodeGenerator should use DOMAttributeGetterSetter when it is DOMAttribute
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-28 01:44 PDT by Philip Jägenstedt
Modified: 2020-06-06 19:54 PDT (History)
10 users (show)

See Also:


Attachments
crash log (119.70 KB, text/plain)
2020-05-28 01:44 PDT, Philip Jägenstedt
no flags Details
standalone repro (825.11 KB, text/html)
2020-05-28 01:44 PDT, Philip Jägenstedt
no flags Details
Patch (7.17 KB, patch)
2020-06-06 05:48 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (9.00 KB, patch)
2020-06-06 06:05 PDT, Yusuke Suzuki
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Jägenstedt 2020-05-28 01:44:36 PDT
Created attachment 400435 [details]
crash log

This is a report for the problem discovered in https://github.com/mdittmer/web-apis/issues/94.

Safari version: 13.1.1 (15609.2.9.1.2)

I found and have attached ~/Library/Logs/DiagnosticReports/com.apple.WebKit.WebContent_2020-05-28-104123_foolip-macbookpro.crash.

I will attach the standalone repro case separately.

It doesn't repro in STP and it also doesn't repro when running with Web Inspector open.
Comment 1 Philip Jägenstedt 2020-05-28 01:44:55 PDT
Created attachment 400436 [details]
standalone repro
Comment 2 Radar WebKit Bug Importer 2020-05-29 03:33:53 PDT
<rdar://problem/63754110>
Comment 3 Yusuke Suzuki 2020-06-06 03:39:33 PDT
Reproduced. Looking!
Comment 4 Yusuke Suzuki 2020-06-06 05:48:44 PDT
Created attachment 401252 [details]
Patch
Comment 5 Yusuke Suzuki 2020-06-06 06:03:53 PDT
I need to update bindings
Comment 6 Yusuke Suzuki 2020-06-06 06:05:59 PDT
Created attachment 401253 [details]
Patch
Comment 7 Mark Lam 2020-06-06 07:28:33 PDT
Comment on attachment 401253 [details]
Patch

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

r=me

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4341
> +                    push(@implContent, "        putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames()." . $attributeName . "PublicName(), CustomGetterSetter::create(vm, $getter, $setter), attributesForStructure($jscAttributes));\n");

Can you also add a bindings test case for this?

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4467
> +        if (IsAcceleratedDOMAttribute($interface, $attribute)) {

Can you add bindings test for these 2 cases as well?

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4487
> +        if (IsAcceleratedDOMAttribute($interface, $attribute)) {

Is it possible to add a bindings test for these 2 cases of PrivateName DOMAttributeGetterSetter and CustomGetterSetter?
Comment 8 Yusuke Suzuki 2020-06-06 19:14:21 PDT
Comment on attachment 401253 [details]
Patch

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

>> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4341
>> +                    push(@implContent, "        putDirectCustomAccessor(vm, static_cast<JSVMClientData*>(vm.clientData)->builtinNames()." . $attributeName . "PublicName(), CustomGetterSetter::create(vm, $getter, $setter), attributesForStructure($jscAttributes));\n");
> 
> Can you also add a bindings test case for this?

Added.

>> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4467
>> +        if (IsAcceleratedDOMAttribute($interface, $attribute)) {
> 
> Can you add bindings test for these 2 cases as well?

It turned out that this never happens. I've added assertion.

>> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4487
>> +        if (IsAcceleratedDOMAttribute($interface, $attribute)) {
> 
> Is it possible to add a bindings test for these 2 cases of PrivateName DOMAttributeGetterSetter and CustomGetterSetter?

It turned out that this never happens. I've added assertion.
Comment 9 Yusuke Suzuki 2020-06-06 19:54:58 PDT
Committed r262693: <https://trac.webkit.org/changeset/262693>