Changeset 115442 in webkit


Ignore:
Timestamp:
Apr 27, 2012 9:35:38 AM (12 years ago)
Author:
zandobersek@gmail.com
Message:

[Gtk][DOM Bindings] Feature-protected properties are put under condition guards
https://bugs.webkit.org/show_bug.cgi?id=85068

Reviewed by Martin Robinson.

Generated feature-dependent properties are now present regardless of that
feature being enabled. On getting or setting that property's value a warning
is thrown if the feature is not enabled. Additionally, if the generated
interface is feature-dependant, when getting or setting any property's value
a warning is thrown if the feature is not enabled.

No new tests - covered by existing bindings tests.

  • bindings/scripts/CodeGeneratorGObject.pm:

(GenerateProperty):
(GenerateProperties):

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

(webkit_dom_test_interface_set_property):
(webkit_dom_test_interface_get_property):
(webkit_dom_test_interface_class_init):

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

(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_get_property):
(webkit_dom_test_obj_class_init):

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

(webkit_dom_test_serialized_script_value_interface_get_property):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r115438 r115442  
     12012-04-27  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        [Gtk][DOM Bindings] Feature-protected properties are put under condition guards
     4        https://bugs.webkit.org/show_bug.cgi?id=85068
     5
     6        Reviewed by Martin Robinson.
     7
     8        Generated feature-dependent properties are now present regardless of that
     9        feature being enabled. On getting or setting that property's value a warning
     10        is thrown if the feature is not enabled. Additionally, if the generated
     11        interface is feature-dependant, when getting or setting any property's value
     12        a warning is thrown if the feature is not enabled.
     13
     14        No new tests - covered by existing bindings tests.
     15
     16        * bindings/scripts/CodeGeneratorGObject.pm:
     17        (GenerateProperty):
     18        (GenerateProperties):
     19        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Rebaseline.
     20        (webkit_dom_test_interface_set_property):
     21        (webkit_dom_test_interface_get_property):
     22        (webkit_dom_test_interface_class_init):
     23        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
     24        (webkit_dom_test_obj_set_property):
     25        (webkit_dom_test_obj_get_property):
     26        (webkit_dom_test_obj_class_init):
     27        * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: Ditto.
     28        (webkit_dom_test_serialized_script_value_interface_get_property):
     29
    1302012-04-27  Zan Dobersek  <zandobersek@gmail.com>
    231
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r115438 r115442  
    347347{
    348348    my $node = shift;
     349    my $indentSize = shift;
     350    if (!$indentSize) {
     351        $indentSize = 4;
     352    }
     353
    349354    my $conditional = $node->extendedAttributes->{"Conditional"};
    350355    my @warn;
     
    355360            foreach $condition (@splitConditionals) {
    356361                push(@warn, "#if !ENABLE($condition)\n");
    357                 push(@warn, "    WEBKIT_WARN_FEATURE_NOT_PRESENT(\"" . HumanReadableConditional($condition) . "\")\n");
     362                push(@warn, ' ' x $indentSize . "WEBKIT_WARN_FEATURE_NOT_PRESENT(\"" . HumanReadableConditional($condition) . "\")\n");
    358363                push(@warn, "#endif\n");
    359364            }
    360365        } elsif ($conditional =~ /\|/) {
    361366            foreach $condition (split(/\|/, $conditional)) {
    362                 push(@warn, "    WEBKIT_WARN_FEATURE_NOT_PRESENT(\"" . HumanReadableConditional($condition) . "\")\n");
     367                push(@warn, ' ' x $indentSize . "WEBKIT_WARN_FEATURE_NOT_PRESENT(\"" . HumanReadableConditional($condition) . "\")\n");
    363368            }
    364369        } else {
    365             push(@warn, "    WEBKIT_WARN_FEATURE_NOT_PRESENT(\"" . HumanReadableConditional($conditional) . "\")\n");
     370            push(@warn, ' ' x $indentSize . "WEBKIT_WARN_FEATURE_NOT_PRESENT(\"" . HumanReadableConditional($conditional) . "\")\n");
    366371        }
    367372    }
     
    374379    my $interfaceName = shift;
    375380    my @writeableProperties = @{shift @_};
     381    my $parentNode = shift;
    376382
    377383    my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
     384    my @conditionalWarn = GenerateConditionalWarning($attribute->signature, 8);
     385    my $parentConditionalString = $codeGenerator->GenerateConditionalString($parentNode);
     386    my @parentConditionalWarn = GenerateConditionalWarning($parentNode, 8);
    378387    my $camelPropName = $attribute->signature->name;
    379388    my $setPropNameFunction = $codeGenerator->WK_ucfirst($camelPropName);
     
    384393    $propName =~ s/_/-/g;
    385394    my ${propEnum} = "PROP_${propNameCaps}";
    386     push(@cBodyProperties, "#if ${conditionalString}\n") if $conditionalString;
    387395    push(@cBodyProperties, "    ${propEnum},\n");
    388     push(@cBodyProperties, "#endif /* ${conditionalString} */\n") if $conditionalString;
    389396
    390397    my $propType = $attribute->signature->type;
     
    435442
    436443    if (grep {$_ eq $attribute} @writeableProperties) {
     444        push(@txtSetProps, "    case ${propEnum}: {\n");
     445        push(@txtSetProps, "#if ${parentConditionalString}\n") if $parentConditionalString;
    437446        push(@txtSetProps, "#if ${conditionalString}\n") if $conditionalString;
    438         push(@txtSetProps, "    case ${propEnum}: {\n");
    439447        push(@txtSetProps, "        WebCore::ExceptionCode ec = 0;\n") if @{$attribute->setterExceptions};
    440448        push(@txtSetProps, "        ${setterFunctionName}(" . join(", ", @setterArguments) . ");\n");
     449        push(@txtSetProps, "#else\n") if $conditionalString;
     450        push(@txtSetProps, @conditionalWarn) if scalar(@conditionalWarn);
     451        push(@txtSetProps, "#endif /* ${conditionalString} */\n") if $conditionalString;
     452        push(@txtSetProps, "#else\n") if $parentConditionalString;
     453        push(@txtSetProps, @parentConditionalWarn) if scalar(@parentConditionalWarn);
     454        push(@txtSetProps, "#endif /* ${parentConditionalString} */\n") if $parentConditionalString;
    441455        push(@txtSetProps, "        break;\n    }\n");
    442         push(@txtSetProps, "#endif /* ${conditionalString} */\n") if $conditionalString;
    443     }
    444 
     456    }
     457
     458    push(@txtGetProps, "    case ${propEnum}: {\n");
     459    push(@txtGetProps, "#if ${parentConditionalString}\n") if $parentConditionalString;
    445460    push(@txtGetProps, "#if ${conditionalString}\n") if $conditionalString;
    446     push(@txtGetProps, "    case ${propEnum}: {\n");
    447461    push(@txtGetProps, "        WebCore::ExceptionCode ec = 0;\n") if @{$attribute->getterExceptions};
    448462
     
    474488    }
    475489
     490    push(@txtGetProps, "#else\n") if $conditionalString;
     491    push(@txtGetProps, @conditionalWarn) if scalar(@conditionalWarn);
     492    push(@txtGetProps, "#endif /* ${conditionalString} */\n") if $conditionalString;
     493    push(@txtGetProps, "#else\n") if $parentConditionalString;
     494    push(@txtGetProps, @parentConditionalWarn) if scalar(@parentConditionalWarn);
     495    push(@txtGetProps, "#endif /* ${parentConditionalString} */\n") if $parentConditionalString;
    476496    push(@txtGetProps, "        break;\n    }\n");
    477     push(@txtGetProps, "#endif /* ${conditionalString} */\n") if $conditionalString;
    478497
    479498    my %param_spec_options = ("int", "G_MININT, /* min */\nG_MAXINT, /* max */\n0, /* default */",
     
    501520                                                           ${gparamflag}));
    502521EOF
    503     push(@txtInstallProps, "#if ${conditionalString}\n") if $conditionalString;
    504522    push(@txtInstallProps, $txtInstallProp);
    505     push(@txtInstallProps, "#endif /* ${conditionalString} */\n") if $conditionalString;
    506523}
    507524
     
    578595        if ($attribute->signature->type ne "EventListener" &&
    579596            $attribute->signature->type ne "MediaQueryListListener") {
    580             GenerateProperty($attribute, $interfaceName, \@writeableProperties);
     597            GenerateProperty($attribute, $interfaceName, \@writeableProperties, $dataNode);
    581598        }
    582599    }
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp

    r115438 r115442  
    8686enum {
    8787    PROP_0,
    88 #if ENABLE(Condition11) || ENABLE(Condition12)
    8988    PROP_SUPPLEMENTAL_STR1,
    90 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    91 #if ENABLE(Condition11) || ENABLE(Condition12)
    9289    PROP_SUPPLEMENTAL_STR2,
    93 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    94 #if ENABLE(Condition11) || ENABLE(Condition12)
    9590    PROP_SUPPLEMENTAL_NODE,
    96 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    9791};
    9892
     
    121115    WebCore::TestInterface* coreSelf = WebKit::core(self);
    122116    switch (propertyId) {
    123 #if ENABLE(Condition11) || ENABLE(Condition12)
    124117    case PROP_SUPPLEMENTAL_STR2: {
     118#if ENABLE(Condition1) || ENABLE(Condition2)
     119#if ENABLE(Condition11) || ENABLE(Condition12)
    125120        WebCore::TestSupplemental::setSupplementalStr2(coreSelf, WTF::String::fromUTF8(g_value_get_string(value)));
    126         break;
    127     }
    128 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     121#else
     122        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition11")
     123        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition12")
     124#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     125#else
     126        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     127        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     128#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
     129        break;
     130    }
    129131    default:
    130132        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
     
    140142    WebCore::TestInterface* coreSelf = WebKit::core(self);
    141143    switch (propertyId) {
    142 #if ENABLE(Condition11) || ENABLE(Condition12)
    143144    case PROP_SUPPLEMENTAL_STR1: {
     145#if ENABLE(Condition1) || ENABLE(Condition2)
     146#if ENABLE(Condition11) || ENABLE(Condition12)
    144147        g_value_take_string(value, convertToUTF8String(WebCore::TestSupplemental::supplementalStr1(coreSelf)));
    145         break;
    146     }
    147 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    148 #if ENABLE(Condition11) || ENABLE(Condition12)
     148#else
     149        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition11")
     150        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition12")
     151#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     152#else
     153        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     154        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     155#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
     156        break;
     157    }
    149158    case PROP_SUPPLEMENTAL_STR2: {
     159#if ENABLE(Condition1) || ENABLE(Condition2)
     160#if ENABLE(Condition11) || ENABLE(Condition12)
    150161        g_value_take_string(value, convertToUTF8String(WebCore::TestSupplemental::supplementalStr2(coreSelf)));
    151         break;
    152     }
    153 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    154 #if ENABLE(Condition11) || ENABLE(Condition12)
     162#else
     163        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition11")
     164        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition12")
     165#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     166#else
     167        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     168        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     169#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
     170        break;
     171    }
    155172    case PROP_SUPPLEMENTAL_NODE: {
     173#if ENABLE(Condition1) || ENABLE(Condition2)
     174#if ENABLE(Condition11) || ENABLE(Condition12)
    156175        RefPtr<WebCore::Node> ptr = WebCore::TestSupplemental::supplementalNode(coreSelf);
    157176        g_value_set_object(value, WebKit::kit(ptr.get()));
    158         break;
    159     }
    160 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     177#else
     178        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition11")
     179        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition12")
     180#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     181#else
     182        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     183        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     184#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
     185        break;
     186    }
    161187    default:
    162188        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
     
    181207    gobjectClass->constructed = webkit_dom_test_interface_constructed;
    182208
    183 #if ENABLE(Condition11) || ENABLE(Condition12)
    184209    g_object_class_install_property(gobjectClass,
    185210                                    PROP_SUPPLEMENTAL_STR1,
     
    189214                                                           "", /* default */
    190215                                                           WEBKIT_PARAM_READABLE));
    191 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    192 #if ENABLE(Condition11) || ENABLE(Condition12)
    193216    g_object_class_install_property(gobjectClass,
    194217                                    PROP_SUPPLEMENTAL_STR2,
     
    198221                                                           "", /* default */
    199222                                                           WEBKIT_PARAM_READWRITE));
    200 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    201 #if ENABLE(Condition11) || ENABLE(Condition12)
    202223    g_object_class_install_property(gobjectClass,
    203224                                    PROP_SUPPLEMENTAL_NODE,
     
    207228                                                           WEBKIT_TYPE_DOM_NODE, /* gobject type */
    208229                                                           WEBKIT_PARAM_READWRITE));
    209 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    210230
    211231
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp

    r113450 r115442  
    134134    PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_WITH_SPACES_ATTRIBUTE,
    135135    PROP_WITH_SCRIPT_ARGUMENTS_AND_CALL_STACK_ATTRIBUTE,
    136 #if ENABLE(Condition1)
    137136    PROP_CONDITIONAL_ATTR1,
    138 #endif /* ENABLE(Condition1) */
    139 #if ENABLE(Condition1) && ENABLE(Condition2)
    140137    PROP_CONDITIONAL_ATTR2,
    141 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
    142 #if ENABLE(Condition1) || ENABLE(Condition2)
    143138    PROP_CONDITIONAL_ATTR3,
    144 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    145139    PROP_CONTENT_DOCUMENT,
    146140    PROP_MUTABLE_POINT,
     
    257251        break;
    258252    }
     253    case PROP_CONDITIONAL_ATTR1: {
    259254#if ENABLE(Condition1)
    260     case PROP_CONDITIONAL_ATTR1: {
    261255        coreSelf->setConditionalAttr1((g_value_get_long(value)));
    262         break;
    263     }
     256#else
     257        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
    264258#endif /* ENABLE(Condition1) */
     259        break;
     260    }
     261    case PROP_CONDITIONAL_ATTR2: {
    265262#if ENABLE(Condition1) && ENABLE(Condition2)
    266     case PROP_CONDITIONAL_ATTR2: {
    267263        coreSelf->setConditionalAttr2((g_value_get_long(value)));
    268         break;
    269     }
     264#else
     265#if !ENABLE(Condition1)
     266        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     267#endif
     268#if !ENABLE(Condition2)
     269        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     270#endif
    270271#endif /* ENABLE(Condition1) && ENABLE(Condition2) */
     272        break;
     273    }
     274    case PROP_CONDITIONAL_ATTR3: {
    271275#if ENABLE(Condition1) || ENABLE(Condition2)
    272     case PROP_CONDITIONAL_ATTR3: {
    273276        coreSelf->setConditionalAttr3((g_value_get_long(value)));
    274         break;
    275     }
     277#else
     278        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     279        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
    276280#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
     281        break;
     282    }
    277283    case PROP_STRICT_FLOAT: {
    278284        coreSelf->setStrictFloat((g_value_get_float(value)));
     
    443449        break;
    444450    }
     451    case PROP_CONDITIONAL_ATTR1: {
    445452#if ENABLE(Condition1)
    446     case PROP_CONDITIONAL_ATTR1: {
    447453        g_value_set_long(value, coreSelf->conditionalAttr1());
    448         break;
    449     }
     454#else
     455        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
    450456#endif /* ENABLE(Condition1) */
     457        break;
     458    }
     459    case PROP_CONDITIONAL_ATTR2: {
    451460#if ENABLE(Condition1) && ENABLE(Condition2)
    452     case PROP_CONDITIONAL_ATTR2: {
    453461        g_value_set_long(value, coreSelf->conditionalAttr2());
    454         break;
    455     }
     462#else
     463#if !ENABLE(Condition1)
     464        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     465#endif
     466#if !ENABLE(Condition2)
     467        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     468#endif
    456469#endif /* ENABLE(Condition1) && ENABLE(Condition2) */
     470        break;
     471    }
     472    case PROP_CONDITIONAL_ATTR3: {
    457473#if ENABLE(Condition1) || ENABLE(Condition2)
    458     case PROP_CONDITIONAL_ATTR3: {
    459474        g_value_set_long(value, coreSelf->conditionalAttr3());
    460         break;
    461     }
     475#else
     476        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     477        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
    462478#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
     479        break;
     480    }
    463481    case PROP_CONTENT_DOCUMENT: {
    464482        RefPtr<WebCore::Document> ptr = coreSelf->contentDocument();
     
    773791                                                           WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
    774792                                                           WEBKIT_PARAM_READWRITE));
    775 #if ENABLE(Condition1)
    776793    g_object_class_install_property(gobjectClass,
    777794                                    PROP_CONDITIONAL_ATTR1,
     
    7838000, /* default */
    784801                                                           WEBKIT_PARAM_READWRITE));
    785 #endif /* ENABLE(Condition1) */
    786 #if ENABLE(Condition1) && ENABLE(Condition2)
    787802    g_object_class_install_property(gobjectClass,
    788803                                    PROP_CONDITIONAL_ATTR2,
     
    7948090, /* default */
    795810                                                           WEBKIT_PARAM_READWRITE));
    796 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
    797 #if ENABLE(Condition1) || ENABLE(Condition2)
    798811    g_object_class_install_property(gobjectClass,
    799812                                    PROP_CONDITIONAL_ATTR3,
     
    8058180, /* default */
    806819                                                           WEBKIT_PARAM_READWRITE));
    807 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    808820    g_object_class_install_property(gobjectClass,
    809821                                    PROP_CONTENT_DOCUMENT,
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp

    r115438 r115442  
    130130    switch (propertyId) {
    131131    case PROP_VALUE: {
     132#if ENABLE(Condition1) || ENABLE(Condition2)
    132133        RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->value();
    133134        g_value_set_object(value, WebKit::kit(ptr.get()));
     135#else
     136        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     137        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     138#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    134139        break;
    135140    }
    136141    case PROP_READONLY_VALUE: {
     142#if ENABLE(Condition1) || ENABLE(Condition2)
    137143        RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->readonlyValue();
    138144        g_value_set_object(value, WebKit::kit(ptr.get()));
     145#else
     146        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     147        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     148#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    139149        break;
    140150    }
    141151    case PROP_CACHED_VALUE: {
     152#if ENABLE(Condition1) || ENABLE(Condition2)
    142153        RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->cachedValue();
    143154        g_value_set_object(value, WebKit::kit(ptr.get()));
     155#else
     156        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     157        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     158#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    144159        break;
    145160    }
    146161    case PROP_PORTS: {
     162#if ENABLE(Condition1) || ENABLE(Condition2)
    147163        RefPtr<WebCore::MessagePortArray> ptr = coreSelf->ports();
    148164        g_value_set_object(value, WebKit::kit(ptr.get()));
     165#else
     166        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     167        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     168#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    149169        break;
    150170    }
    151171    case PROP_CACHED_READONLY_VALUE: {
     172#if ENABLE(Condition1) || ENABLE(Condition2)
    152173        RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->cachedReadonlyValue();
    153174        g_value_set_object(value, WebKit::kit(ptr.get()));
     175#else
     176        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
     177        WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
     178#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    154179        break;
    155180    }
Note: See TracChangeset for help on using the changeset viewer.