Changeset 207394 in webkit


Ignore:
Timestamp:
Oct 16, 2016 11:59:31 AM (8 years ago)
Author:
Simon Fraser
Message:

Implement serializer = { attribute }
https://bugs.webkit.org/show_bug.cgi?id=163466

Follow-up fix to die if "serializer {...}" lists an attribute not present
on the interface. I don't think this is testable with the current bindings tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateSerializerFunction):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207393 r207394  
     12016-10-16  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Implement serializer = { attribute }
     4        https://bugs.webkit.org/show_bug.cgi?id=163466
     5       
     6        Follow-up fix to die if "serializer {...}" lists an attribute not present
     7        on the interface. I don't think this is testable with the current bindings tests.
     8
     9        * bindings/scripts/CodeGeneratorJS.pm:
     10        (GenerateSerializerFunction):
     11
    1122016-10-16  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r207378 r207394  
    39853985    my @serializedAttributes = ();
    39863986    foreach my $attribute_name (@{$interface->serializable->attributes}) {
     3987        my $found_attribute = 0;
    39873988        foreach my $attribute (@{$interface->attributes}) {
    39883989            if ($attribute_name eq $attribute->signature->name) {
    39893990                push @serializedAttributes, $attribute;
     3991                $found_attribute = 1;
    39903992                last;
    39913993            }
    39923994        }
     3995       
     3996        die "Failed to find \"serializate\" attribute \"$attribute_name\" in $interfaceName" if !$found_attribute;
    39933997    }
    39943998
Note: See TracChangeset for help on using the changeset viewer.