- Revision
- 122005
- Author
- mrobin...@webkit.org
- Date
- 2012-07-06 13:03:14 -0700 (Fri, 06 Jul 2012)
Log Message
Merge 116949 - [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.neelakan...@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):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (122004 => 122005)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-07-06 20:03:06 UTC (rev 122004)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-07-06 20:03:14 UTC (rev 122005)
@@ -1,3 +1,33 @@
+2012-05-14 Sriram Neelakandan <sriram.neelakan...@gmail.com>
+
+ [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-30 Daniel Drake <d...@laptop.org>
Check for GTK2/GTK3 symbol mismatch earlier
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (122004 => 122005)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2012-07-06 20:03:06 UTC (rev 122004)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2012-07-06 20:03:14 UTC (rev 122005)
@@ -559,8 +559,10 @@
push(@txtGetProps, $txtGetProp);
if (scalar @readableProperties > 0) {
$txtGetProp = << "EOF";
+$conditionGuardStart
${className}* self = WEBKIT_DOM_${clsCaps}(object);
$privFunction
+$conditionGuardEnd
EOF
push(@txtGetProps, "$conditionGuardStart\n") if $conditionGuardStart;
push(@txtGetProps, $txtGetProp);
@@ -583,8 +585,10 @@
if (scalar @writeableProperties > 0) {
$txtSetProps = << "EOF";
+$conditionGuardStart
${className}* self = WEBKIT_DOM_${clsCaps}(object);
$privFunction
+$conditionGuardEnd
EOF
push(@txtSetProps, "$conditionGuardStart\n") if $conditionGuardStart;
push(@txtSetProps, $txtSetProps);
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp (122004 => 122005)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp 2012-07-06 20:03:06 UTC (rev 122004)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp 2012-07-06 20:03:14 UTC (rev 122005)
@@ -114,8 +114,10 @@
static void webkit_dom_test_active_dom_object_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
WebCore::JSMainThreadNullState state;
+
WebKitDOMTestActiveDOMObject* self = WEBKIT_DOM_TEST_ACTIVE_DOM_OBJECT(object);
WebCore::TestActiveDOMObject* coreSelf = WebKit::core(self);
+
switch (prop_id) {
case PROP_EXCITING_ATTR:
{
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp (122004 => 122005)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp 2012-07-06 20:03:06 UTC (rev 122004)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp 2012-07-06 20:03:14 UTC (rev 122005)
@@ -113,8 +113,10 @@
static void webkit_dom_test_event_constructor_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
WebCore::JSMainThreadNullState state;
+
WebKitDOMTestEventConstructor* self = WEBKIT_DOM_TEST_EVENT_CONSTRUCTOR(object);
WebCore::TestEventConstructor* coreSelf = WebKit::core(self);
+
switch (prop_id) {
case PROP_ATTR1:
{
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp (122004 => 122005)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp 2012-07-06 20:03:06 UTC (rev 122004)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp 2012-07-06 20:03:14 UTC (rev 122005)
@@ -115,9 +115,11 @@
{
WebCore::JSMainThreadNullState state;
#if ENABLE(Condition1) || ENABLE(Condition2)
+#if ENABLE(Condition1) || ENABLE(Condition2)
WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object);
WebCore::TestInterface* coreSelf = WebKit::core(self);
#endif // ENABLE(Condition1) || ENABLE(Condition2)
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
switch (prop_id) {
#if ENABLE(Condition11) || ENABLE(Condition12)
case PROP_SUPPLEMENTAL_STR2:
@@ -142,9 +144,11 @@
{
WebCore::JSMainThreadNullState state;
#if ENABLE(Condition1) || ENABLE(Condition2)
+#if ENABLE(Condition1) || ENABLE(Condition2)
WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object);
WebCore::TestInterface* coreSelf = WebKit::core(self);
#endif // ENABLE(Condition1) || ENABLE(Condition2)
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
switch (prop_id) {
#if ENABLE(Condition11) || ENABLE(Condition12)
case PROP_SUPPLEMENTAL_STR1:
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (122004 => 122005)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2012-07-06 20:03:06 UTC (rev 122004)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2012-07-06 20:03:14 UTC (rev 122005)
@@ -175,8 +175,10 @@
static void webkit_dom_test_obj_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
WebCore::JSMainThreadNullState state;
+
WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
WebCore::TestObj* coreSelf = WebKit::core(self);
+
switch (prop_id) {
case PROP_UNSIGNED_SHORT_ATTR:
{
@@ -318,8 +320,10 @@
static void webkit_dom_test_obj_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
WebCore::JSMainThreadNullState state;
+
WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
WebCore::TestObj* coreSelf = WebKit::core(self);
+
switch (prop_id) {
case PROP_READ_ONLY_INT_ATTR:
{
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp (122004 => 122005)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp 2012-07-06 20:03:06 UTC (rev 122004)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp 2012-07-06 20:03:14 UTC (rev 122005)
@@ -123,9 +123,11 @@
{
WebCore::JSMainThreadNullState state;
#if ENABLE(Condition1) || ENABLE(Condition2)
+#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)
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
switch (prop_id) {
case PROP_VALUE:
{