Title: [116949] trunk/Source/WebCore
Revision
116949
Author
[email protected]
Date
2012-05-14 08:28:24 -0700 (Mon, 14 May 2012)

Log 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 <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (116948 => 116949)


--- trunk/Source/WebCore/ChangeLog	2012-05-14 15:23:43 UTC (rev 116948)
+++ trunk/Source/WebCore/ChangeLog	2012-05-14 15:28:24 UTC (rev 116949)
@@ -1,3 +1,33 @@
+2012-05-14  Sriram Neelakandan  <[email protected]>
+
+        [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
+
+        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):
+
 2012-05-14  Alexander Pavlov  <[email protected]>
 
         Web Inspector: [Styles] css properties copied into clipboard contain extra line breaks before color values

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (116948 => 116949)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2012-05-14 15:23:43 UTC (rev 116948)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2012-05-14 15:28:24 UTC (rev 116949)
@@ -558,8 +558,10 @@
     push(@txtGetProps, $txtGetProp);
     if (scalar @readableProperties > 0) {
         $txtGetProp = << "EOF";
+$conditionGuardStart
     ${className}* self = WEBKIT_DOM_${clsCaps}(object);
     $privFunction
+$conditionGuardEnd
 EOF
         push(@txtGetProps, $txtGetProp);
     }
@@ -580,8 +582,10 @@
 
     if (scalar @writeableProperties > 0) {
         $txtSetProps = << "EOF";
+$conditionGuardStart
     ${className}* self = WEBKIT_DOM_${clsCaps}(object);
     $privFunction
+$conditionGuardEnd
 EOF
         push(@txtSetProps, $txtSetProps);
     }

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp (116948 => 116949)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp	2012-05-14 15:23:43 UTC (rev 116948)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp	2012-05-14 15:28:24 UTC (rev 116949)
@@ -111,8 +111,10 @@
 static void webkit_dom_test_active_dom_object_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
 {
     WebCore::JSMainThreadNullState state;
+
     WebKitDOMTestActiveDOMObject* self = WEBKIT_DOM_TEST_ACTIVE_DOM_OBJECT(object);
     WebCore::TestActiveDOMObject* coreSelf = WebKit::core(self);
+
     switch (propertyId) {
     case PROP_EXCITING_ATTR: {
         g_value_set_long(value, coreSelf->excitingAttr());

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp (116948 => 116949)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp	2012-05-14 15:23:43 UTC (rev 116948)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp	2012-05-14 15:28:24 UTC (rev 116949)
@@ -110,8 +110,10 @@
 static void webkit_dom_test_event_constructor_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
 {
     WebCore::JSMainThreadNullState state;
+
     WebKitDOMTestEventConstructor* self = WEBKIT_DOM_TEST_EVENT_CONSTRUCTOR(object);
     WebCore::TestEventConstructor* coreSelf = WebKit::core(self);
+
     switch (propertyId) {
     case PROP_ATTR1: {
         g_value_take_string(value, convertToUTF8String(coreSelf->attr1()));

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestException.cpp (116948 => 116949)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestException.cpp	2012-05-14 15:23:43 UTC (rev 116948)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestException.cpp	2012-05-14 15:28:24 UTC (rev 116949)
@@ -109,8 +109,10 @@
 static void webkit_dom_test_exception_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
 {
     WebCore::JSMainThreadNullState state;
+
     WebKitDOMTestException* self = WEBKIT_DOM_TEST_EXCEPTION(object);
     WebCore::TestException* coreSelf = WebKit::core(self);
+
     switch (propertyId) {
     case PROP_NAME: {
         g_value_take_string(value, convertToUTF8String(coreSelf->name()));

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp (116948 => 116949)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp	2012-05-14 15:23:43 UTC (rev 116948)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp	2012-05-14 15:28:24 UTC (rev 116949)
@@ -111,8 +111,10 @@
 static void webkit_dom_test_interface_set_property(GObject* object, guint propertyId, const GValue* value, GParamSpec* pspec)
 {
     WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) || ENABLE(Condition2)
     WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object);
     WebCore::TestInterface* coreSelf = WebKit::core(self);
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
     switch (propertyId) {
     case PROP_SUPPLEMENTAL_STR2: {
 #if ENABLE(Condition1) || ENABLE(Condition2)
@@ -138,8 +140,10 @@
 static void webkit_dom_test_interface_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
 {
     WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) || ENABLE(Condition2)
     WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object);
     WebCore::TestInterface* coreSelf = WebKit::core(self);
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
     switch (propertyId) {
     case PROP_SUPPLEMENTAL_STR1: {
 #if ENABLE(Condition1) || ENABLE(Condition2)

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (116948 => 116949)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp	2012-05-14 15:23:43 UTC (rev 116948)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp	2012-05-14 15:28:24 UTC (rev 116949)
@@ -167,8 +167,10 @@
 static void webkit_dom_test_obj_set_property(GObject* object, guint propertyId, const GValue* value, GParamSpec* pspec)
 {
     WebCore::JSMainThreadNullState state;
+
     WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
     WebCore::TestObj* coreSelf = WebKit::core(self);
+
     switch (propertyId) {
     case PROP_UNSIGNED_SHORT_ATTR: {
         coreSelf->setUnsignedShortAttr((g_value_get_uint(value)));
@@ -298,8 +300,10 @@
 static void webkit_dom_test_obj_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
 {
     WebCore::JSMainThreadNullState state;
+
     WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
     WebCore::TestObj* coreSelf = WebKit::core(self);
+
     switch (propertyId) {
     case PROP_READ_ONLY_INT_ATTR: {
         g_value_set_long(value, coreSelf->readOnlyIntAttr());

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp (116948 => 116949)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp	2012-05-14 15:23:43 UTC (rev 116948)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp	2012-05-14 15:28:24 UTC (rev 116949)
@@ -125,8 +125,10 @@
 static void webkit_dom_test_serialized_script_value_interface_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
 {
     WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) || ENABLE(Condition2)
     WebKitDOMTestSerializedScriptValueInterface* self = WEBKIT_DOM_TEST_SERIALIZED_SCRIPT_VALUE_INTERFACE(object);
     WebCore::TestSerializedScriptValueInterface* coreSelf = WebKit::core(self);
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
     switch (propertyId) {
     case PROP_VALUE: {
 #if ENABLE(Condition1) || ENABLE(Condition2)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to