- Revision
- 208582
- Author
- [email protected]
- Date
- 2016-11-10 23:42:05 -0800 (Thu, 10 Nov 2016)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (208581 => 208582)
--- trunk/Source/WebCore/ChangeLog 2016-11-11 06:29:44 UTC (rev 208581)
+++ trunk/Source/WebCore/ChangeLog 2016-11-11 07:42:05 UTC (rev 208582)
@@ -1,3 +1,22 @@
+2016-11-10 Yusuke Suzuki <[email protected]>
+
+ [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:
+
2016-11-10 Sam Weinig <[email protected]>
[SVG] Start moving special casing of SVG out of the bindings - SVGPreserveAspectRatio
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (208581 => 208582)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-11-11 06:29:44 UTC (rev 208581)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-11-11 07:42:05 UTC (rev 208582)
@@ -1792,6 +1792,7 @@
push(@headerContent,"// DOMJIT emitters for attributes\n\n");
foreach my $attribute (@{$interface->attributes}) {
next unless $attribute->extendedAttributes->{"DOMJIT"};
+ assert("Only DOMJIT=Getter is supported for attributes") unless $codeGenerator->ExtendedAttributeContains($attribute->extendedAttributes->{DOMJIT}, "Getter");
my $interfaceName = $interface->type->name;
my $className = $interfaceName . $codeGenerator->WK_ucfirst($attribute->name);
@@ -3403,6 +3404,8 @@
push(@implContent, "}\n\n");
if ($attribute->extendedAttributes->{"DOMJIT"}) {
+ assert("Only DOMJIT=Getter is supported for attributes") unless $codeGenerator->ExtendedAttributeContains($attribute->extendedAttributes->{DOMJIT}, "Getter");
+
$implIncludes{"<wtf/NeverDestroyed.h>"} = 1;
$implIncludes{"DOMJITIDLTypeFilter.h"} = 1;
my $interfaceName = $interface->type->name;
Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (208581 => 208582)
--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2016-11-11 06:29:44 UTC (rev 208581)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2016-11-11 07:42:05 UTC (rev 208582)
@@ -52,7 +52,7 @@
CustomSetPrototype
CustomSetter
CustomToJSObject
-DOMJIT=|ReadDOM
+DOMJIT=|ReadDOM|Getter
DoNotCheckConstants
DoNotCheckSecurity
DoNotCheckSecurityOnGetter
Modified: trunk/Source/WebCore/bindings/scripts/test/TestDOMJIT.idl (208581 => 208582)
--- trunk/Source/WebCore/bindings/scripts/test/TestDOMJIT.idl 2016-11-11 06:29:44 UTC (rev 208581)
+++ trunk/Source/WebCore/bindings/scripts/test/TestDOMJIT.idl 2016-11-11 07:42:05 UTC (rev 208582)
@@ -27,42 +27,42 @@
*/
interface TestDOMJIT : Node {
- [DOMJIT] readonly attribute any anyAttr;
- [DOMJIT] readonly attribute boolean booleanAttr;
- [DOMJIT] readonly attribute byte byteAttr;
- [DOMJIT] readonly attribute octet octetAttr;
- [DOMJIT] readonly attribute short shortAttr;
- [DOMJIT] readonly attribute unsigned short unsignedShortAttr;
- [DOMJIT] readonly attribute long longAttr;
- [DOMJIT] readonly attribute unsigned long unsignedLongAttr;
- [DOMJIT] readonly attribute long long longLongAttr;
- [DOMJIT] readonly attribute unsigned long long unsignedLongLongAttr;
- [DOMJIT] readonly attribute float floatAttr;
- [DOMJIT] readonly attribute unrestricted float unrestrictedFloatAttr;
- [DOMJIT] readonly attribute double doubleAttr;
- [DOMJIT] readonly attribute unrestricted double unrestrictedDoubleAttr;
- [DOMJIT] readonly attribute DOMString domStringAttr;
- [DOMJIT] readonly attribute ByteString byteStringAttr;
- [DOMJIT] readonly attribute USVString usvStringAttr;
- [DOMJIT] readonly attribute Node nodeAttr;
+ [DOMJIT=Getter] readonly attribute any anyAttr;
+ [DOMJIT=Getter] readonly attribute boolean booleanAttr;
+ [DOMJIT=Getter] readonly attribute byte byteAttr;
+ [DOMJIT=Getter] readonly attribute octet octetAttr;
+ [DOMJIT=Getter] readonly attribute short shortAttr;
+ [DOMJIT=Getter] readonly attribute unsigned short unsignedShortAttr;
+ [DOMJIT=Getter] readonly attribute long longAttr;
+ [DOMJIT=Getter] readonly attribute unsigned long unsignedLongAttr;
+ [DOMJIT=Getter] readonly attribute long long longLongAttr;
+ [DOMJIT=Getter] readonly attribute unsigned long long unsignedLongLongAttr;
+ [DOMJIT=Getter] readonly attribute float floatAttr;
+ [DOMJIT=Getter] readonly attribute unrestricted float unrestrictedFloatAttr;
+ [DOMJIT=Getter] readonly attribute double doubleAttr;
+ [DOMJIT=Getter] readonly attribute unrestricted double unrestrictedDoubleAttr;
+ [DOMJIT=Getter] readonly attribute DOMString domStringAttr;
+ [DOMJIT=Getter] readonly attribute ByteString byteStringAttr;
+ [DOMJIT=Getter] readonly attribute USVString usvStringAttr;
+ [DOMJIT=Getter] readonly attribute Node nodeAttr;
- [DOMJIT] readonly attribute boolean? booleanNullableAttr;
- [DOMJIT] readonly attribute byte? byteNullableAttr;
- [DOMJIT] readonly attribute octet? octetNullableAttr;
- [DOMJIT] readonly attribute short? shortNullableAttr;
- [DOMJIT] readonly attribute unsigned short? unsignedShortNullableAttr;
- [DOMJIT] readonly attribute long? longNullableAttr;
- [DOMJIT] readonly attribute unsigned long? unsignedLongNullableAttr;
- [DOMJIT] readonly attribute long long? longLongNullableAttr;
- [DOMJIT] readonly attribute unsigned long long? unsignedLongLongNullableAttr;
- [DOMJIT] readonly attribute float? floatNullableAttr;
- [DOMJIT] readonly attribute unrestricted float? unrestrictedFloatNullableAttr;
- [DOMJIT] readonly attribute double? doubleNullableAttr;
- [DOMJIT] readonly attribute unrestricted double? unrestrictedDoubleNullableAttr;
- [DOMJIT] readonly attribute DOMString? domStringNullableAttr;
- [DOMJIT] readonly attribute ByteString? byteStringNullableAttr;
- [DOMJIT] readonly attribute USVString? usvStringNullableAttr;
- [DOMJIT] readonly attribute Node? nodeNullableAttr;
+ [DOMJIT=Getter] readonly attribute boolean? booleanNullableAttr;
+ [DOMJIT=Getter] readonly attribute byte? byteNullableAttr;
+ [DOMJIT=Getter] readonly attribute octet? octetNullableAttr;
+ [DOMJIT=Getter] readonly attribute short? shortNullableAttr;
+ [DOMJIT=Getter] readonly attribute unsigned short? unsignedShortNullableAttr;
+ [DOMJIT=Getter] readonly attribute long? longNullableAttr;
+ [DOMJIT=Getter] readonly attribute unsigned long? unsignedLongNullableAttr;
+ [DOMJIT=Getter] readonly attribute long long? longLongNullableAttr;
+ [DOMJIT=Getter] readonly attribute unsigned long long? unsignedLongLongNullableAttr;
+ [DOMJIT=Getter] readonly attribute float? floatNullableAttr;
+ [DOMJIT=Getter] readonly attribute unrestricted float? unrestrictedFloatNullableAttr;
+ [DOMJIT=Getter] readonly attribute double? doubleNullableAttr;
+ [DOMJIT=Getter] readonly attribute unrestricted double? unrestrictedDoubleNullableAttr;
+ [DOMJIT=Getter] readonly attribute DOMString? domStringNullableAttr;
+ [DOMJIT=Getter] readonly attribute ByteString? byteStringNullableAttr;
+ [DOMJIT=Getter] readonly attribute USVString? usvStringNullableAttr;
+ [DOMJIT=Getter] readonly attribute Node? nodeNullableAttr;
[DOMJIT=ReadDOM] DOMString? getAttribute(DOMString name);
[DOMJIT=ReadDOM] DOMString item(unsigned short x, unsigned short y);
Modified: trunk/Source/WebCore/dom/Document.idl (208581 => 208582)
--- trunk/Source/WebCore/dom/Document.idl 2016-11-11 06:29:44 UTC (rev 208581)
+++ trunk/Source/WebCore/dom/Document.idl 2016-11-11 07:42:05 UTC (rev 208582)
@@ -29,7 +29,7 @@
] interface Document : Node {
readonly attribute DocumentType? doctype;
readonly attribute DOMImplementation implementation;
- [DOMJIT] readonly attribute Element? documentElement;
+ [DOMJIT=Getter] readonly attribute Element? documentElement;
[NewObject, MayThrowException, ImplementedAs=createElementForBindings] Element createElement(DOMString tagName);
[NewObject] DocumentFragment createDocumentFragment();
@@ -101,7 +101,7 @@
[GetterMayThrowException, SetterMayThrowException] attribute USVString cookie;
- [CEReactions, DOMJIT, ImplementedAs=bodyOrFrameset, SetterMayThrowException] attribute HTMLElement? body;
+ [CEReactions, DOMJIT=Getter, ImplementedAs=bodyOrFrameset, SetterMayThrowException] attribute HTMLElement? body;
readonly attribute HTMLHeadElement? head;
readonly attribute HTMLCollection images;
Modified: trunk/Source/WebCore/dom/Node.idl (208581 => 208582)
--- trunk/Source/WebCore/dom/Node.idl 2016-11-11 06:29:44 UTC (rev 208581)
+++ trunk/Source/WebCore/dom/Node.idl 2016-11-11 07:42:05 UTC (rev 208582)
@@ -46,14 +46,14 @@
// FIXME: the spec says this can also raise on retrieval.
[CEReactions, SetterMayThrowLegacyException] attribute DOMString? nodeValue;
- [DOMJIT, CustomGetter] readonly attribute unsigned short nodeType;
- [DOMJIT] readonly attribute Node? parentNode;
+ [DOMJIT=Getter, CustomGetter] readonly attribute unsigned short nodeType;
+ [DOMJIT=Getter] readonly attribute Node? parentNode;
readonly attribute NodeList childNodes;
- [DOMJIT] readonly attribute Node? firstChild;
- [DOMJIT] readonly attribute Node? lastChild;
- [DOMJIT] readonly attribute Node? previousSibling;
- [DOMJIT] readonly attribute Node? nextSibling;
- [DOMJIT] readonly attribute Document? ownerDocument;
+ [DOMJIT=Getter] readonly attribute Node? firstChild;
+ [DOMJIT=Getter] readonly attribute Node? lastChild;
+ [DOMJIT=Getter] readonly attribute Node? previousSibling;
+ [DOMJIT=Getter] readonly attribute Node? nextSibling;
+ [DOMJIT=Getter] readonly attribute Document? ownerDocument;
[CEReactions, Custom, MayThrowLegacyException] Node insertBefore(Node newChild, Node? refChild);
[CEReactions, Custom, MayThrowLegacyException] Node replaceChild(Node newChild, Node oldChild);