Changeset 195904 in webkit


Ignore:
Timestamp:
Jan 30, 2016 12:10:18 PM (8 years ago)
Author:
Chris Dumez
Message:

Move more 'constructor' properties to the prototype
https://bugs.webkit.org/show_bug.cgi?id=153667

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing. A lot of
the 'constructor' attributes checks are still failing because the
attribute is not writable. This is being addressed via Bug 149412.

  • web-platform-tests/dom/collections/HTMLCollection-supported-property-names-expected.txt:
  • web-platform-tests/dom/interfaces-expected.txt:
  • web-platform-tests/dom/nodes/Element-getElementsByTagName-expected.txt:
  • web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms-expected.txt:
  • web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Move more 'constructor' properties to the prototype. In particular, we
used to keep the 'constructor' on the instance for interfaces that have
an indexed / named property getter because our getOwnPropertySlot()
implementation used to be wrong for such interfaces.

However, getOwnPropertySlot() should be correct after r188590 so we
should now be able to move the 'constructor' up to the prototype for
these interfaces, as per the specification:
http://heycam.github.io/webidl/#interface-prototype-object

No new tests, already covered by existing tests.

  • bindings/js/JSPluginElementFunctions.h:

(WebCore::pluginElementCustomGetOwnPropertySlot):
Add a null check for staticPropHashTable. It is now null because this
type no longer has any property on the instance now that 'constructor'
is on the prototype.

  • bindings/scripts/CodeGeneratorJS.pm:

(ConstructorShouldBeOnInstance):

LayoutTests:

Rebaseline a couple of tests now that 'constructor' is on the prototype
for more interfaces.

  • fast/dom/htmlcollection-getownpropertynames-expected.txt:
  • storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195899 r195904  
     12016-01-30  Chris Dumez  <cdumez@apple.com>
     2
     3        Move more 'constructor' properties to the prototype
     4        https://bugs.webkit.org/show_bug.cgi?id=153667
     5
     6        Reviewed by Darin Adler.
     7
     8        Rebaseline a couple of tests now that 'constructor' is on the prototype
     9        for more interfaces.
     10
     11        * fast/dom/htmlcollection-getownpropertynames-expected.txt:
     12        * storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt:
     13
    1142016-01-30  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/LayoutTests/fast/dom/htmlcollection-getownpropertynames-expected.txt

    r190280 r195904  
    55
    66* Own properties
    7 Actual:   ['0', '1', '2', '3', '4', '5', '6', '7', 'some-id', 'some-name', 'another-id', 'another-name', 'constructor', 'length']
     7Actual:   ['0', '1', '2', '3', '4', '5', '6', '7', 'some-id', 'some-name', 'another-id', 'another-name', 'length']
    88Expected: ['0', '1', '2', '3', '4', '5', '6', '7', 'some-id', 'some-name', 'another-id', 'another-name']
    99
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r195798 r195904  
     12016-01-30  Chris Dumez  <cdumez@apple.com>
     2
     3        Move more 'constructor' properties to the prototype
     4        https://bugs.webkit.org/show_bug.cgi?id=153667
     5
     6        Reviewed by Darin Adler.
     7
     8        Rebaseline several W3C tests now that more checks are passing. A lot of
     9        the 'constructor' attributes checks are still failing because the
     10        attribute is not writable. This is being addressed via Bug 149412.
     11
     12        * web-platform-tests/dom/collections/HTMLCollection-supported-property-names-expected.txt:
     13        * web-platform-tests/dom/interfaces-expected.txt:
     14        * web-platform-tests/dom/nodes/Element-getElementsByTagName-expected.txt:
     15        * web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms-expected.txt:
     16        * web-platform-tests/html/dom/interfaces-expected.txt:
     17
    1182016-01-28  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-supported-property-names-expected.txt

    r190280 r195904  
    11
    2 FAIL Object.getOwnPropertyNames on HTMLCollection assert_array_equals: lengths differ, expected 12 got 14
    3 FAIL Object.getOwnPropertyNames on HTMLCollection with non-HTML namespace assert_array_equals: lengths differ, expected 1 got 3
    4 FAIL Object.getOwnPropertyNames on HTMLCollection with expando object assert_array_equals: lengths differ, expected 2 got 4
     2FAIL Object.getOwnPropertyNames on HTMLCollection assert_array_equals: lengths differ, expected 12 got 13
     3FAIL Object.getOwnPropertyNames on HTMLCollection with non-HTML namespace assert_array_equals: lengths differ, expected 1 got 2
     4FAIL Object.getOwnPropertyNames on HTMLCollection with expando object assert_array_equals: lengths differ, expected 2 got 3
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt

    r195798 r195904  
    122122PASS NodeList interface object name
    123123PASS NodeList interface: existence and properties of interface prototype object
    124 FAIL NodeList interface: existence and properties of interface prototype object's "constructor" property assert_own_property: NodeList.prototype does not have own property "constructor" expected property "constructor" missing
     124FAIL NodeList interface: existence and properties of interface prototype object's "constructor" property assert_true: NodeList.prototype.constructor is not writable expected true got false
    125125PASS NodeList interface: operation item(unsigned long)
    126126FAIL NodeList interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
     
    134134PASS HTMLCollection interface object name
    135135PASS HTMLCollection interface: existence and properties of interface prototype object
    136 FAIL HTMLCollection interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLCollection.prototype does not have own property "constructor" expected property "constructor" missing
     136FAIL HTMLCollection interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLCollection.prototype.constructor is not writable expected true got false
    137137FAIL HTMLCollection interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    138138FAIL HTMLCollection interface: operation item(unsigned long) assert_equals: property has wrong .length expected 1 but got 0
     
    928928PASS NamedNodeMap interface object name
    929929PASS NamedNodeMap interface: existence and properties of interface prototype object
    930 FAIL NamedNodeMap interface: existence and properties of interface prototype object's "constructor" property assert_own_property: NamedNodeMap.prototype does not have own property "constructor" expected property "constructor" missing
     930FAIL NamedNodeMap interface: existence and properties of interface prototype object's "constructor" property assert_true: NamedNodeMap.prototype.constructor is not writable expected true got false
    931931FAIL NamedNodeMap interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    932932FAIL NamedNodeMap interface: operation item(unsigned long) assert_equals: property has wrong .length expected 1 but got 0
     
    15511551PASS DOMTokenList interface object name
    15521552PASS DOMTokenList interface: existence and properties of interface prototype object
    1553 FAIL DOMTokenList interface: existence and properties of interface prototype object's "constructor" property assert_own_property: DOMTokenList.prototype does not have own property "constructor" expected property "constructor" missing
     1553FAIL DOMTokenList interface: existence and properties of interface prototype object's "constructor" property assert_true: DOMTokenList.prototype.constructor is not writable expected true got false
    15541554FAIL DOMTokenList interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    15551555PASS DOMTokenList interface: operation item(unsigned long)
     
    15761576PASS DOMSettableTokenList interface object name
    15771577PASS DOMSettableTokenList interface: existence and properties of interface prototype object
    1578 FAIL DOMSettableTokenList interface: existence and properties of interface prototype object's "constructor" property assert_own_property: DOMSettableTokenList.prototype does not have own property "constructor" expected property "constructor" missing
     1578FAIL DOMSettableTokenList interface: existence and properties of interface prototype object's "constructor" property assert_true: DOMSettableTokenList.prototype.constructor is not writable expected true got false
    15791579FAIL DOMSettableTokenList interface: attribute value assert_equals: getter must be Function expected "function" but got "undefined"
    15801580
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-getElementsByTagName-expected.txt

    r195091 r195904  
    99PASS Should be able to set expando shadowing a proto prop (item)
    1010PASS Should be able to set expando shadowing a proto prop (namedItem)
    11 FAIL hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames assert_array_equals: lengths differ, expected 7 got 9
     11FAIL hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames assert_array_equals: lengths differ, expected 7 got 8
    1212PASS HTML element with uppercase tagName never matches in HTML Documents
    1313PASS Element in non-HTML namespace, no prefix, lowercase name
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms-expected.txt

    r190280 r195904  
    66PASS document.forms with empty string
    77FAIL document.forms iteration assert_array_equals: property 3, expected "item" but got "length"
    8 FAIL document.forms getOwnPropertyNames assert_array_equals: lengths differ, expected 5 got 7
     8FAIL document.forms getOwnPropertyNames assert_array_equals: lengths differ, expected 5 got 6
    99
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r195798 r195904  
    756756PASS HTMLAllCollection interface object name
    757757FAIL HTMLAllCollection interface: existence and properties of interface prototype object assert_equals: prototype of HTMLAllCollection.prototype is not HTMLCollection.prototype expected object "[object HTMLCollectionPrototype]" but got object "[object Object]"
    758 FAIL HTMLAllCollection interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLAllCollection.prototype does not have own property "constructor" expected property "constructor" missing
     758FAIL HTMLAllCollection interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLAllCollection.prototype.constructor is not writable expected true got false
    759759FAIL HTMLAllCollection interface: operation item(unsigned long) assert_equals: property has wrong .length expected 1 but got 0
    760760FAIL HTMLAllCollection interface: operation item(DOMString) assert_equals: property has wrong .length expected 1 but got 0
     
    777777PASS HTMLFormControlsCollection interface object name
    778778PASS HTMLFormControlsCollection interface: existence and properties of interface prototype object
    779 FAIL HTMLFormControlsCollection interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLFormControlsCollection.prototype does not have own property "constructor" expected property "constructor" missing
     779FAIL HTMLFormControlsCollection interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLFormControlsCollection.prototype.constructor is not writable expected true got false
    780780FAIL HTMLFormControlsCollection interface: operation namedItem(DOMString) assert_equals: property has wrong .length expected 1 but got 0
    781781FAIL HTMLFormControlsCollection must be primary interface of document.createElement("form").elements assert_equals: wrong typeof object expected "function" but got "object"
     
    792792PASS RadioNodeList interface object name
    793793PASS RadioNodeList interface: existence and properties of interface prototype object
    794 FAIL RadioNodeList interface: existence and properties of interface prototype object's "constructor" property assert_own_property: RadioNodeList.prototype does not have own property "constructor" expected property "constructor" missing
     794FAIL RadioNodeList interface: existence and properties of interface prototype object's "constructor" property assert_true: RadioNodeList.prototype.constructor is not writable expected true got false
    795795FAIL RadioNodeList interface: attribute value assert_equals: getter must be Function expected "function" but got "undefined"
    796796FAIL HTMLOptionsCollection interface: existence and properties of interface object assert_equals: class string of HTMLOptionsCollection expected "[object Function]" but got "[object HTMLOptionsCollectionConstructor]"
     
    798798PASS HTMLOptionsCollection interface object name
    799799PASS HTMLOptionsCollection interface: existence and properties of interface prototype object
    800 FAIL HTMLOptionsCollection interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLOptionsCollection.prototype does not have own property "constructor" expected property "constructor" missing
     800FAIL HTMLOptionsCollection interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLOptionsCollection.prototype.constructor is not writable expected true got false
    801801FAIL HTMLOptionsCollection interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    802802PASS HTMLOptionsCollection interface: operation add([object Object],[object Object],[object Object],[object Object])
     
    843843PASS DOMStringMap interface object name
    844844PASS DOMStringMap interface: existence and properties of interface prototype object
    845 FAIL DOMStringMap interface: existence and properties of interface prototype object's "constructor" property assert_own_property: DOMStringMap.prototype does not have own property "constructor" expected property "constructor" missing
     845FAIL DOMStringMap interface: existence and properties of interface prototype object's "constructor" property assert_true: DOMStringMap.prototype.constructor is not writable expected true got false
    846846PASS DOMStringMap must be primary interface of document.head.dataset
    847847PASS Stringification of document.head.dataset
     
    17951795PASS HTMLEmbedElement interface object name
    17961796PASS HTMLEmbedElement interface: existence and properties of interface prototype object
    1797 FAIL HTMLEmbedElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLEmbedElement.prototype does not have own property "constructor" expected property "constructor" missing
     1797FAIL HTMLEmbedElement interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLEmbedElement.prototype.constructor is not writable expected true got false
    17981798FAIL HTMLEmbedElement interface: attribute src assert_equals: getter must be Function expected "function" but got "undefined"
    17991799FAIL HTMLEmbedElement interface: attribute type assert_equals: getter must be Function expected "function" but got "undefined"
     
    18161816PASS HTMLObjectElement interface object name
    18171817PASS HTMLObjectElement interface: existence and properties of interface prototype object
    1818 FAIL HTMLObjectElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLObjectElement.prototype does not have own property "constructor" expected property "constructor" missing
     1818FAIL HTMLObjectElement interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLObjectElement.prototype.constructor is not writable expected true got false
    18191819FAIL HTMLObjectElement interface: attribute data assert_equals: getter must be Function expected "function" but got "undefined"
    18201820FAIL HTMLObjectElement interface: attribute type assert_equals: getter must be Function expected "function" but got "undefined"
     
    23092309PASS TextTrackList interface object name
    23102310FAIL TextTrackList interface: existence and properties of interface prototype object assert_equals: prototype of TextTrackList.prototype is not EventTarget.prototype expected object "[object EventTargetPrototype]" but got object "[object Object]"
    2311 FAIL TextTrackList interface: existence and properties of interface prototype object's "constructor" property assert_own_property: TextTrackList.prototype does not have own property "constructor" expected property "constructor" missing
     2311FAIL TextTrackList interface: existence and properties of interface prototype object's "constructor" property assert_true: TextTrackList.prototype.constructor is not writable expected true got false
    23122312FAIL TextTrackList interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    23132313PASS TextTrackList interface: operation getTrackById(DOMString)
     
    23782378PASS TextTrackCueList interface object name
    23792379PASS TextTrackCueList interface: existence and properties of interface prototype object
    2380 FAIL TextTrackCueList interface: existence and properties of interface prototype object's "constructor" property assert_own_property: TextTrackCueList.prototype does not have own property "constructor" expected property "constructor" missing
     2380FAIL TextTrackCueList interface: existence and properties of interface prototype object's "constructor" property assert_true: TextTrackCueList.prototype.constructor is not writable expected true got false
    23812381FAIL TextTrackCueList interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    23822382PASS TextTrackCueList interface: operation getCueById(DOMString)
     
    27512751PASS HTMLFormElement interface object name
    27522752PASS HTMLFormElement interface: existence and properties of interface prototype object
    2753 FAIL HTMLFormElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLFormElement.prototype does not have own property "constructor" expected property "constructor" missing
     2753FAIL HTMLFormElement interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLFormElement.prototype.constructor is not writable expected true got false
    27542754FAIL HTMLFormElement interface: attribute acceptCharset assert_equals: getter must be Function expected "function" but got "undefined"
    27552755FAIL HTMLFormElement interface: attribute action assert_equals: getter must be Function expected "function" but got "undefined"
     
    29802980PASS HTMLSelectElement interface object name
    29812981PASS HTMLSelectElement interface: existence and properties of interface prototype object
    2982 FAIL HTMLSelectElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLSelectElement.prototype does not have own property "constructor" expected property "constructor" missing
     2982FAIL HTMLSelectElement interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLSelectElement.prototype.constructor is not writable expected true got false
    29832983FAIL HTMLSelectElement interface: attribute autocomplete assert_equals: getter must be Function expected "function" but got "undefined"
    29842984FAIL HTMLSelectElement interface: attribute autofocus assert_equals: getter must be Function expected "function" but got "undefined"
     
    40794079PASS History interface object name
    40804080PASS History interface: existence and properties of interface prototype object
    4081 FAIL History interface: existence and properties of interface prototype object's "constructor" property assert_own_property: History.prototype does not have own property "constructor" expected property "constructor" missing
     4081FAIL History interface: existence and properties of interface prototype object's "constructor" property assert_true: History.prototype.constructor is not writable expected true got false
    40824082FAIL History interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    40834083FAIL History interface: attribute state assert_true: The prototype object must have a property "state" expected true got false
     
    41074107PASS Location interface object name
    41084108PASS Location interface: existence and properties of interface prototype object
    4109 FAIL Location interface: existence and properties of interface prototype object's "constructor" property assert_own_property: Location.prototype does not have own property "constructor" expected property "constructor" missing
     4109FAIL Location interface: existence and properties of interface prototype object's "constructor" property assert_true: Location.prototype.constructor is not writable expected true got false
    41104110PASS Location must be primary interface of window.location
    41114111PASS Stringification of window.location
     
    43034303PASS PluginArray interface object name
    43044304PASS PluginArray interface: existence and properties of interface prototype object
    4305 FAIL PluginArray interface: existence and properties of interface prototype object's "constructor" property assert_own_property: PluginArray.prototype does not have own property "constructor" expected property "constructor" missing
     4305FAIL PluginArray interface: existence and properties of interface prototype object's "constructor" property assert_true: PluginArray.prototype.constructor is not writable expected true got false
    43064306PASS PluginArray interface: operation refresh(boolean)
    43074307FAIL PluginArray interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
     
    43124312PASS MimeTypeArray interface object name
    43134313PASS MimeTypeArray interface: existence and properties of interface prototype object
    4314 FAIL MimeTypeArray interface: existence and properties of interface prototype object's "constructor" property assert_own_property: MimeTypeArray.prototype does not have own property "constructor" expected property "constructor" missing
     4314FAIL MimeTypeArray interface: existence and properties of interface prototype object's "constructor" property assert_true: MimeTypeArray.prototype.constructor is not writable expected true got false
    43154315FAIL MimeTypeArray interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    43164316FAIL MimeTypeArray interface: operation item(unsigned long) assert_equals: property has wrong .length expected 1 but got 0
     
    43204320PASS Plugin interface object name
    43214321PASS Plugin interface: existence and properties of interface prototype object
    4322 FAIL Plugin interface: existence and properties of interface prototype object's "constructor" property assert_own_property: Plugin.prototype does not have own property "constructor" expected property "constructor" missing
     4322FAIL Plugin interface: existence and properties of interface prototype object's "constructor" property assert_true: Plugin.prototype.constructor is not writable expected true got false
    43234323FAIL Plugin interface: attribute name assert_equals: getter must be Function expected "function" but got "undefined"
    43244324FAIL Plugin interface: attribute description assert_equals: getter must be Function expected "function" but got "undefined"
     
    45424542PASS Storage interface object name
    45434543PASS Storage interface: existence and properties of interface prototype object
    4544 FAIL Storage interface: existence and properties of interface prototype object's "constructor" property assert_own_property: Storage.prototype does not have own property "constructor" expected property "constructor" missing
     4544FAIL Storage interface: existence and properties of interface prototype object's "constructor" property assert_true: Storage.prototype.constructor is not writable expected true got false
    45454545FAIL Storage interface: attribute length assert_true: The prototype object must have a property "length" expected true got false
    45464546PASS Storage interface: operation key(unsigned long)
     
    45634563PASS HTMLAppletElement interface object name
    45644564PASS HTMLAppletElement interface: existence and properties of interface prototype object
    4565 FAIL HTMLAppletElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLAppletElement.prototype does not have own property "constructor" expected property "constructor" missing
     4565FAIL HTMLAppletElement interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLAppletElement.prototype.constructor is not writable expected true got false
    45664566FAIL HTMLAppletElement interface: attribute align assert_equals: getter must be Function expected "function" but got "undefined"
    45674567FAIL HTMLAppletElement interface: attribute alt assert_equals: getter must be Function expected "function" but got "undefined"
     
    46314631PASS HTMLFrameSetElement interface object name
    46324632PASS HTMLFrameSetElement interface: existence and properties of interface prototype object
    4633 FAIL HTMLFrameSetElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: HTMLFrameSetElement.prototype does not have own property "constructor" expected property "constructor" missing
     4633FAIL HTMLFrameSetElement interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLFrameSetElement.prototype.constructor is not writable expected true got false
    46344634FAIL HTMLFrameSetElement interface: attribute cols assert_equals: getter must be Function expected "function" but got "undefined"
    46354635FAIL HTMLFrameSetElement interface: attribute rows assert_equals: getter must be Function expected "function" but got "undefined"
  • trunk/LayoutTests/storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt

    r194403 r195904  
    1 CONSOLE MESSAGE: line 12: constructor,length
    2 CONSOLE MESSAGE: line 15: 1,constructor,length
    3 CONSOLE MESSAGE: line 18: 1,constructor,length
    4 CONSOLE MESSAGE: line 21: 1,2,constructor,length
    5 CONSOLE MESSAGE: line 24: 1,constructor,length
    6 CONSOLE MESSAGE: line 27: 1,constructor,length,Test
    7 CONSOLE MESSAGE: line 30: 1,constructor,length
    8 CONSOLE MESSAGE: line 33: 1,constructor,length,Test1
    9 CONSOLE MESSAGE: line 36: 1,constructor,length,Test1
     1CONSOLE MESSAGE: line 12: length
     2CONSOLE MESSAGE: line 15: 1,length
     3CONSOLE MESSAGE: line 18: 1,length
     4CONSOLE MESSAGE: line 21: 1,2,length
     5CONSOLE MESSAGE: line 24: 1,length
     6CONSOLE MESSAGE: line 27: 1,length,Test
     7CONSOLE MESSAGE: line 30: 1,length
     8CONSOLE MESSAGE: line 33: 1,length,Test1
     9CONSOLE MESSAGE: line 36: 1,length,Test1
    1010
  • trunk/Source/WebCore/ChangeLog

    r195901 r195904  
     12016-01-30  Chris Dumez  <cdumez@apple.com>
     2
     3        Move more 'constructor' properties to the prototype
     4        https://bugs.webkit.org/show_bug.cgi?id=153667
     5
     6        Reviewed by Darin Adler.
     7
     8        Move more 'constructor' properties to the prototype. In particular, we
     9        used to keep the 'constructor' on the instance for interfaces that have
     10        an indexed / named property getter because our getOwnPropertySlot()
     11        implementation used to be wrong for such interfaces.
     12
     13        However, getOwnPropertySlot() should be correct after r188590 so we
     14        should now be able to move the 'constructor' up to the prototype for
     15        these interfaces, as per the specification:
     16        http://heycam.github.io/webidl/#interface-prototype-object
     17
     18        No new tests, already covered by existing tests.
     19
     20        * bindings/js/JSPluginElementFunctions.h:
     21        (WebCore::pluginElementCustomGetOwnPropertySlot):
     22        Add a null check for staticPropHashTable. It is now null because this
     23        type no longer has any property on the instance now that 'constructor'
     24        is on the prototype.
     25
     26        * bindings/scripts/CodeGeneratorJS.pm:
     27        (ConstructorShouldBeOnInstance):
     28
    1292016-01-29  Ada Chan  <adachan@apple.com>
    230
  • trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h

    r172849 r195904  
    4747    {
    4848        if (!element->globalObject()->world().isNormal()) {
    49             if (JSC::getStaticValueSlot<Type, Base>(exec, *Type::info()->staticPropHashTable, element, propertyName, slot))
     49            if (Type::info()->staticPropHashTable && JSC::getStaticValueSlot<Type, Base>(exec, *Type::info()->staticPropHashTable, element, propertyName, slot))
    5050                return true;
    5151
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r195798 r195904  
    685685{
    686686    my $interface = shift;
     687
    687688    return 1 if $interface->extendedAttributes->{"CheckSecurity"};
    688     return HasComplexGetOwnProperty($interface);
     689    return 0;
    689690}
    690691
Note: See TracChangeset for help on using the changeset viewer.