Changeset 202031 in webkit


Ignore:
Timestamp:
Jun 13, 2016, 11:18:32 PM (9 years ago)
Author:
barraclough@apple.com
Message:

Remove hasStaticPropertyTable (part 4: JSHTMLDocument & JSStorage)
https://bugs.webkit.org/show_bug.cgi?id=158431

Reviewed by Chris Dumez.

All uses of hasStaticPropertyTable flag generated by bindings are wrong.

JSHTMLDocument & JSStorage contain a number of static_asserts claiming that
various methods do not support static properties. These asserts were likely
correct at the time they were added, as JSObject::getOwnPropertySlot and
JSObject::deleteProperty did not support getting / deleting static value.
This is no longer the case, and these asserts are now incorrect.

  • bindings/js/JSHTMLDocumentCustom.cpp:

(WebCore::JSHTMLDocument::getOwnPropertySlot):

  • bindings/js/JSStorageCustom.cpp:

(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::deletePropertyByIndex):
(WebCore::JSStorage::putDelegate):

  • remove incorrect static_asserts.
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r202030 r202031  
     12016-06-13  Gavin & Ellie Barraclough  <barraclough@apple.com>
     2
     3        Remove hasStaticPropertyTable (part 4: JSHTMLDocument & JSStorage)
     4        https://bugs.webkit.org/show_bug.cgi?id=158431
     5
     6        Reviewed by Chris Dumez.
     7
     8        All uses of hasStaticPropertyTable flag generated by bindings are wrong.
     9
     10        JSHTMLDocument & JSStorage contain a number of static_asserts claiming that
     11        various methods do not support static properties. These asserts were likely
     12        correct at the time they were added, as JSObject::getOwnPropertySlot and
     13        JSObject::deleteProperty did not support getting / deleting static value.
     14        This is no longer the case, and these asserts are now incorrect.
     15
     16        * bindings/js/JSHTMLDocumentCustom.cpp:
     17        (WebCore::JSHTMLDocument::getOwnPropertySlot):
     18        * bindings/js/JSStorageCustom.cpp:
     19        (WebCore::JSStorage::deleteProperty):
     20        (WebCore::JSStorage::deletePropertyByIndex):
     21        (WebCore::JSStorage::putDelegate):
     22            - remove incorrect static_asserts.
     23
    1242016-06-13  Gavin & Ellie Barraclough  <barraclough@apple.com>
    225
  • trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp

    r201129 r202031  
    9090    }
    9191
    92     static_assert(!hasStaticPropertyTable, "This method does not handle static instance properties");
    93 
    9492    return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    9593}
  • trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp

    r198023 r202031  
    6060    PropertySlot slot(thisObject, PropertySlot::InternalMethodType::GetOwnProperty);
    6161
    62     static_assert(!hasStaticPropertyTable, "This function does not handle static instance properties");
    63 
    6462    JSValue prototype = thisObject->getPrototypeDirect();
    6563    if (prototype.isObject() && asObject(prototype)->getPropertySlot(exec, propertyName, slot))
     
    7775bool JSStorage::deletePropertyByIndex(JSCell* cell, ExecState* exec, unsigned propertyName)
    7876{
    79     static_assert(!hasStaticPropertyTable, "This function does not handle static instance properties");
    8077    return deleteProperty(cell, exec, Identifier::from(exec, propertyName));
    8178}
     
    105102    // the native property slots manually.
    106103    PropertySlot slot(this, PropertySlot::InternalMethodType::GetOwnProperty);
    107     static_assert(!hasStaticPropertyTable, "This function does not handle static instance properties");
    108104
    109105    JSValue prototype = this->getPrototypeDirect();
Note: See TracChangeset for help on using the changeset viewer.