Changeset 116949 in webkit


Ignore:
Timestamp:
May 14, 2012 8:28:24 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Gtk][DOM Bindings] Feature-protected interface usage in set/get property must be under condition guards
https://bugs.webkit.org/show_bug.cgi?id=86060

Patch by Sriram Neelakandan <sriram.neelakandan@gmail.com> on 2012-05-14
Reviewed by Martin Robinson.

Property set/get functions generated was referencing WebCore::interface without any condition guard.
This issue was triggered usually when an interface gets disabled; For instance; --disable-video, disables WebCore::HTMLMediaElement.
Also updated the GObject binding reference tests

No new tests - covered by existing bindings tests

  • bindings/scripts/CodeGeneratorGObject.pm:

(GenerateProperties):

  • bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:

(webkit_dom_test_active_dom_object_get_property):

  • bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:

(webkit_dom_test_event_constructor_get_property):

  • bindings/scripts/test/GObject/WebKitDOMTestException.cpp:

(webkit_dom_test_exception_get_property):

  • bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:

(webkit_dom_test_interface_set_property):
(webkit_dom_test_interface_get_property):

  • bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:

(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_get_property):

  • bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:

(webkit_dom_test_serialized_script_value_interface_get_property):

Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116946 r116949  
     12012-05-14  Sriram Neelakandan  <sriram.neelakandan@gmail.com>
     2
     3        [Gtk][DOM Bindings] Feature-protected interface usage in set/get property must be under condition guards
     4        https://bugs.webkit.org/show_bug.cgi?id=86060
     5
     6        Reviewed by Martin Robinson.
     7
     8        Property set/get functions generated was referencing WebCore::interface without any condition guard.
     9        This issue was triggered usually when an interface gets disabled; For instance; --disable-video, disables WebCore::HTMLMediaElement.
     10        Also updated the GObject binding reference tests
     11
     12        No new tests - covered by existing bindings tests
     13
     14        * bindings/scripts/CodeGeneratorGObject.pm:
     15        (GenerateProperties):
     16        * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
     17        (webkit_dom_test_active_dom_object_get_property):
     18        * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
     19        (webkit_dom_test_event_constructor_get_property):
     20        * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
     21        (webkit_dom_test_exception_get_property):
     22        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
     23        (webkit_dom_test_interface_set_property):
     24        (webkit_dom_test_interface_get_property):
     25        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
     26        (webkit_dom_test_obj_set_property):
     27        (webkit_dom_test_obj_get_property):
     28        * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
     29        (webkit_dom_test_serialized_script_value_interface_get_property):
     30
    1312012-05-14  Alexander Pavlov  <apavlov@chromium.org>
    232
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r115442 r116949  
    559559    if (scalar @readableProperties > 0) {
    560560        $txtGetProp = << "EOF";
     561$conditionGuardStart
    561562    ${className}* self = WEBKIT_DOM_${clsCaps}(object);
    562563    $privFunction
     564$conditionGuardEnd
    563565EOF
    564566        push(@txtGetProps, $txtGetProp);
     
    581583    if (scalar @writeableProperties > 0) {
    582584        $txtSetProps = << "EOF";
     585$conditionGuardStart
    583586    ${className}* self = WEBKIT_DOM_${clsCaps}(object);
    584587    $privFunction
     588$conditionGuardEnd
    585589EOF
    586590        push(@txtSetProps, $txtSetProps);
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp

    r113450 r116949  
    112112{
    113113    WebCore::JSMainThreadNullState state;
     114
    114115    WebKitDOMTestActiveDOMObject* self = WEBKIT_DOM_TEST_ACTIVE_DOM_OBJECT(object);
    115116    WebCore::TestActiveDOMObject* coreSelf = WebKit::core(self);
     117
    116118    switch (propertyId) {
    117119    case PROP_EXCITING_ATTR: {
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp

    r113450 r116949  
    111111{
    112112    WebCore::JSMainThreadNullState state;
     113
    113114    WebKitDOMTestEventConstructor* self = WEBKIT_DOM_TEST_EVENT_CONSTRUCTOR(object);
    114115    WebCore::TestEventConstructor* coreSelf = WebKit::core(self);
     116
    115117    switch (propertyId) {
    116118    case PROP_ATTR1: {
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestException.cpp

    r116172 r116949  
    110110{
    111111    WebCore::JSMainThreadNullState state;
     112
    112113    WebKitDOMTestException* self = WEBKIT_DOM_TEST_EXCEPTION(object);
    113114    WebCore::TestException* coreSelf = WebKit::core(self);
     115
    114116    switch (propertyId) {
    115117    case PROP_NAME: {
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp

    r115442 r116949  
    112112{
    113113    WebCore::JSMainThreadNullState state;
     114#if ENABLE(Condition1) || ENABLE(Condition2)
    114115    WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object);
    115116    WebCore::TestInterface* coreSelf = WebKit::core(self);
     117#endif // ENABLE(Condition1) || ENABLE(Condition2)
    116118    switch (propertyId) {
    117119    case PROP_SUPPLEMENTAL_STR2: {
     
    139141{
    140142    WebCore::JSMainThreadNullState state;
     143#if ENABLE(Condition1) || ENABLE(Condition2)
    141144    WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object);
    142145    WebCore::TestInterface* coreSelf = WebKit::core(self);
     146#endif // ENABLE(Condition1) || ENABLE(Condition2)
    143147    switch (propertyId) {
    144148    case PROP_SUPPLEMENTAL_STR1: {
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp

    r115442 r116949  
    168168{
    169169    WebCore::JSMainThreadNullState state;
     170
    170171    WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
    171172    WebCore::TestObj* coreSelf = WebKit::core(self);
     173
    172174    switch (propertyId) {
    173175    case PROP_UNSIGNED_SHORT_ATTR: {
     
    299301{
    300302    WebCore::JSMainThreadNullState state;
     303
    301304    WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
    302305    WebCore::TestObj* coreSelf = WebKit::core(self);
     306
    303307    switch (propertyId) {
    304308    case PROP_READ_ONLY_INT_ATTR: {
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp

    r115442 r116949  
    126126{
    127127    WebCore::JSMainThreadNullState state;
     128#if ENABLE(Condition1) || ENABLE(Condition2)
    128129    WebKitDOMTestSerializedScriptValueInterface* self = WEBKIT_DOM_TEST_SERIALIZED_SCRIPT_VALUE_INTERFACE(object);
    129130    WebCore::TestSerializedScriptValueInterface* coreSelf = WebKit::core(self);
     131#endif // ENABLE(Condition1) || ENABLE(Condition2)
    130132    switch (propertyId) {
    131133    case PROP_VALUE: {
Note: See TracChangeset for help on using the changeset viewer.