Changeset 208582 in webkit


Ignore:
Timestamp:
Nov 10, 2016 11:42:05 PM (7 years ago)
Author:
Yusuke Suzuki
Message:

[DOMJIT] DOMJIT accessor attribute in IDL should say like DOMJIT=Getter
https://bugs.webkit.org/show_bug.cgi?id=164632

Reviewed by Sam Weinig.

Currently, DOMJIT patchpoint is only allowed for getter in attributes.
To make it explicit, we use IDL attribute DOMJIT=Getter instead of
DOMJIT.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/test/TestDOMJIT.idl:
  • dom/Document.idl:
  • dom/Node.idl:
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r208581 r208582  
     12016-11-10  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [DOMJIT] DOMJIT accessor attribute in IDL should say like DOMJIT=Getter
     4        https://bugs.webkit.org/show_bug.cgi?id=164632
     5
     6        Reviewed by Sam Weinig.
     7
     8        Currently, DOMJIT patchpoint is only allowed for getter in attributes.
     9        To make it explicit, we use IDL attribute DOMJIT=Getter instead of
     10        DOMJIT.
     11
     12        * bindings/scripts/CodeGeneratorJS.pm:
     13        (GenerateHeader):
     14        (GenerateImplementation):
     15        * bindings/scripts/IDLAttributes.txt:
     16        * bindings/scripts/test/TestDOMJIT.idl:
     17        * dom/Document.idl:
     18        * dom/Node.idl:
     19
    1202016-11-10  Sam Weinig  <sam@webkit.org>
    221
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r208541 r208582  
    17931793        foreach my $attribute (@{$interface->attributes}) {
    17941794            next unless $attribute->extendedAttributes->{"DOMJIT"};
     1795            assert("Only DOMJIT=Getter is supported for attributes") unless $codeGenerator->ExtendedAttributeContains($attribute->extendedAttributes->{DOMJIT}, "Getter");
    17951796
    17961797            my $interfaceName = $interface->type->name;
     
    34043405
    34053406            if ($attribute->extendedAttributes->{"DOMJIT"}) {
     3407                assert("Only DOMJIT=Getter is supported for attributes") unless $codeGenerator->ExtendedAttributeContains($attribute->extendedAttributes->{DOMJIT}, "Getter");
     3408
    34063409                $implIncludes{"<wtf/NeverDestroyed.h>"} = 1;
    34073410                $implIncludes{"DOMJITIDLTypeFilter.h"} = 1;
  • trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt

    r208581 r208582  
    5353CustomSetter
    5454CustomToJSObject
    55 DOMJIT=|ReadDOM
     55DOMJIT=|ReadDOM|Getter
    5656DoNotCheckConstants
    5757DoNotCheckSecurity
  • trunk/Source/WebCore/bindings/scripts/test/TestDOMJIT.idl

    r208320 r208582  
    2828
    2929interface TestDOMJIT : Node {
    30     [DOMJIT] readonly attribute any anyAttr;
    31     [DOMJIT] readonly attribute boolean booleanAttr;
    32     [DOMJIT] readonly attribute byte byteAttr;
    33     [DOMJIT] readonly attribute octet octetAttr;
    34     [DOMJIT] readonly attribute short shortAttr;
    35     [DOMJIT] readonly attribute unsigned short unsignedShortAttr;
    36     [DOMJIT] readonly attribute long longAttr;
    37     [DOMJIT] readonly attribute unsigned long unsignedLongAttr;
    38     [DOMJIT] readonly attribute long long longLongAttr;
    39     [DOMJIT] readonly attribute unsigned long long unsignedLongLongAttr;
    40     [DOMJIT] readonly attribute float floatAttr;
    41     [DOMJIT] readonly attribute unrestricted float unrestrictedFloatAttr;
    42     [DOMJIT] readonly attribute double doubleAttr;
    43     [DOMJIT] readonly attribute unrestricted double unrestrictedDoubleAttr;
    44     [DOMJIT] readonly attribute DOMString domStringAttr;
    45     [DOMJIT] readonly attribute ByteString byteStringAttr;
    46     [DOMJIT] readonly attribute USVString usvStringAttr;
    47     [DOMJIT] readonly attribute Node nodeAttr;
     30    [DOMJIT=Getter] readonly attribute any anyAttr;
     31    [DOMJIT=Getter] readonly attribute boolean booleanAttr;
     32    [DOMJIT=Getter] readonly attribute byte byteAttr;
     33    [DOMJIT=Getter] readonly attribute octet octetAttr;
     34    [DOMJIT=Getter] readonly attribute short shortAttr;
     35    [DOMJIT=Getter] readonly attribute unsigned short unsignedShortAttr;
     36    [DOMJIT=Getter] readonly attribute long longAttr;
     37    [DOMJIT=Getter] readonly attribute unsigned long unsignedLongAttr;
     38    [DOMJIT=Getter] readonly attribute long long longLongAttr;
     39    [DOMJIT=Getter] readonly attribute unsigned long long unsignedLongLongAttr;
     40    [DOMJIT=Getter] readonly attribute float floatAttr;
     41    [DOMJIT=Getter] readonly attribute unrestricted float unrestrictedFloatAttr;
     42    [DOMJIT=Getter] readonly attribute double doubleAttr;
     43    [DOMJIT=Getter] readonly attribute unrestricted double unrestrictedDoubleAttr;
     44    [DOMJIT=Getter] readonly attribute DOMString domStringAttr;
     45    [DOMJIT=Getter] readonly attribute ByteString byteStringAttr;
     46    [DOMJIT=Getter] readonly attribute USVString usvStringAttr;
     47    [DOMJIT=Getter] readonly attribute Node nodeAttr;
    4848
    49     [DOMJIT] readonly attribute boolean? booleanNullableAttr;
    50     [DOMJIT] readonly attribute byte? byteNullableAttr;
    51     [DOMJIT] readonly attribute octet? octetNullableAttr;
    52     [DOMJIT] readonly attribute short? shortNullableAttr;
    53     [DOMJIT] readonly attribute unsigned short? unsignedShortNullableAttr;
    54     [DOMJIT] readonly attribute long? longNullableAttr;
    55     [DOMJIT] readonly attribute unsigned long? unsignedLongNullableAttr;
    56     [DOMJIT] readonly attribute long long? longLongNullableAttr;
    57     [DOMJIT] readonly attribute unsigned long long? unsignedLongLongNullableAttr;
    58     [DOMJIT] readonly attribute float? floatNullableAttr;
    59     [DOMJIT] readonly attribute unrestricted float? unrestrictedFloatNullableAttr;
    60     [DOMJIT] readonly attribute double? doubleNullableAttr;
    61     [DOMJIT] readonly attribute unrestricted double? unrestrictedDoubleNullableAttr;
    62     [DOMJIT] readonly attribute DOMString? domStringNullableAttr;
    63     [DOMJIT] readonly attribute ByteString? byteStringNullableAttr;
    64     [DOMJIT] readonly attribute USVString? usvStringNullableAttr;
    65     [DOMJIT] readonly attribute Node? nodeNullableAttr;
     49    [DOMJIT=Getter] readonly attribute boolean? booleanNullableAttr;
     50    [DOMJIT=Getter] readonly attribute byte? byteNullableAttr;
     51    [DOMJIT=Getter] readonly attribute octet? octetNullableAttr;
     52    [DOMJIT=Getter] readonly attribute short? shortNullableAttr;
     53    [DOMJIT=Getter] readonly attribute unsigned short? unsignedShortNullableAttr;
     54    [DOMJIT=Getter] readonly attribute long? longNullableAttr;
     55    [DOMJIT=Getter] readonly attribute unsigned long? unsignedLongNullableAttr;
     56    [DOMJIT=Getter] readonly attribute long long? longLongNullableAttr;
     57    [DOMJIT=Getter] readonly attribute unsigned long long? unsignedLongLongNullableAttr;
     58    [DOMJIT=Getter] readonly attribute float? floatNullableAttr;
     59    [DOMJIT=Getter] readonly attribute unrestricted float? unrestrictedFloatNullableAttr;
     60    [DOMJIT=Getter] readonly attribute double? doubleNullableAttr;
     61    [DOMJIT=Getter] readonly attribute unrestricted double? unrestrictedDoubleNullableAttr;
     62    [DOMJIT=Getter] readonly attribute DOMString? domStringNullableAttr;
     63    [DOMJIT=Getter] readonly attribute ByteString? byteStringNullableAttr;
     64    [DOMJIT=Getter] readonly attribute USVString? usvStringNullableAttr;
     65    [DOMJIT=Getter] readonly attribute Node? nodeNullableAttr;
    6666
    6767    [DOMJIT=ReadDOM] DOMString? getAttribute(DOMString name);
  • trunk/Source/WebCore/dom/Document.idl

    r208579 r208582  
    3030    readonly attribute DocumentType? doctype;
    3131    readonly attribute DOMImplementation implementation;
    32     [DOMJIT] readonly attribute Element? documentElement;
     32    [DOMJIT=Getter] readonly attribute Element? documentElement;
    3333
    3434    [NewObject, MayThrowException, ImplementedAs=createElementForBindings] Element createElement(DOMString tagName);
     
    102102    [GetterMayThrowException, SetterMayThrowException] attribute USVString cookie;
    103103
    104     [CEReactions, DOMJIT, ImplementedAs=bodyOrFrameset, SetterMayThrowException] attribute HTMLElement? body;
     104    [CEReactions, DOMJIT=Getter, ImplementedAs=bodyOrFrameset, SetterMayThrowException] attribute HTMLElement? body;
    105105
    106106    readonly attribute HTMLHeadElement? head;
  • trunk/Source/WebCore/dom/Node.idl

    r208481 r208582  
    4747    [CEReactions, SetterMayThrowLegacyException] attribute DOMString? nodeValue;
    4848
    49     [DOMJIT, CustomGetter] readonly attribute unsigned short nodeType;
    50     [DOMJIT] readonly attribute Node? parentNode;
     49    [DOMJIT=Getter, CustomGetter] readonly attribute unsigned short nodeType;
     50    [DOMJIT=Getter] readonly attribute Node? parentNode;
    5151    readonly attribute NodeList childNodes;
    52     [DOMJIT] readonly attribute Node? firstChild;
    53     [DOMJIT] readonly attribute Node? lastChild;
    54     [DOMJIT] readonly attribute Node? previousSibling;
    55     [DOMJIT] readonly attribute Node? nextSibling;
    56     [DOMJIT] readonly attribute Document? ownerDocument;
     52    [DOMJIT=Getter] readonly attribute Node? firstChild;
     53    [DOMJIT=Getter] readonly attribute Node? lastChild;
     54    [DOMJIT=Getter] readonly attribute Node? previousSibling;
     55    [DOMJIT=Getter] readonly attribute Node? nextSibling;
     56    [DOMJIT=Getter] readonly attribute Document? ownerDocument;
    5757
    5858    [CEReactions, Custom, MayThrowLegacyException] Node insertBefore(Node newChild, Node? refChild);
Note: See TracChangeset for help on using the changeset viewer.