Title: [185694] trunk/Source/WebCore
Revision
185694
Author
[email protected]
Date
2015-06-18 00:02:58 -0700 (Thu, 18 Jun 2015)

Log Message

GObject and ObjC bindings generator should not generate code for promise-based APIs
https://bugs.webkit.org/show_bug.cgi?id=146059

Reviewed by Darin Adler.

Covered by rebased expectations.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Disabling GObject DOM binding for functions returning promises.
* bindings/scripts/CodeGeneratorObjC.pm:
(SkipFunction): Disabling ObjC DOM binding for functions returning promises.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
(webkit_dom_test_obj_get_read_only_long_attr): Deleted.
(webkit_dom_test_obj_get_read_only_string_attr): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
* bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
(core): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (185693 => 185694)


--- trunk/Source/WebCore/ChangeLog	2015-06-18 06:30:06 UTC (rev 185693)
+++ trunk/Source/WebCore/ChangeLog	2015-06-18 07:02:58 UTC (rev 185694)
@@ -1,3 +1,24 @@
+2015-06-18  Youenn Fablet  <[email protected]>
+
+        GObject and ObjC bindings generator should not generate code for promise-based APIs
+        https://bugs.webkit.org/show_bug.cgi?id=146059
+
+        Reviewed by Darin Adler.
+
+        Covered by rebased expectations.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (SkipFunction): Disabling GObject DOM binding for functions returning promises.
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        (SkipFunction): Disabling ObjC DOM binding for functions returning promises.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
+        (webkit_dom_test_obj_get_read_only_long_attr): Deleted.
+        (webkit_dom_test_obj_get_read_only_string_attr): Deleted.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
+        * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
+        * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
+        (core): Deleted.
+
 2015-06-17  Ryuan Choi  <[email protected]>
 
         [EFL] test_ewk2_context_url_scheme_register has been crashed since r185553

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (185693 => 185694)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2015-06-18 06:30:06 UTC (rev 185693)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2015-06-18 07:02:58 UTC (rev 185694)
@@ -362,6 +362,10 @@
         return 1;
     }
 
+    if ($function->signature->type eq "Promise") {
+        return 1;
+    }
+
     return 0;
 }
 

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm (185693 => 185694)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2015-06-18 06:30:06 UTC (rev 185693)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2015-06-18 07:02:58 UTC (rev 185694)
@@ -537,6 +537,8 @@
     return 1 if $codeGenerator->GetSequenceType($function->signature->type);
     return 1 if $codeGenerator->GetArrayType($function->signature->type);
 
+    return 1 if $function->signature->type eq "Promise";
+
     foreach my $param (@{$function->parameters}) {
         return 1 if $codeGenerator->GetSequenceType($param->type);
         return 1 if $codeGenerator->GetArrayType($param->type);

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


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp	2015-06-18 06:30:06 UTC (rev 185693)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp	2015-06-18 07:02:58 UTC (rev 185694)
@@ -33,7 +33,6 @@
 #include "WebKitDOMDocumentPrivate.h"
 #include "WebKitDOMNodePrivate.h"
 #include "WebKitDOMPrivate.h"
-#include "WebKitDOMPromisePrivate.h"
 #include "WebKitDOMSVGPointPrivate.h"
 #include "WebKitDOMTestEnumTypePrivate.h"
 #include "WebKitDOMTestNodePrivate.h"
@@ -1552,15 +1551,6 @@
     item->any(a, b);
 }
 
-WebKitDOMPromise* webkit_dom_test_obj_test_promise_function(WebKitDOMTestObj* self)
-{
-    WebCore::JSMainThreadNullState state;
-    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
-    WebCore::TestObj* item = WebKit::core(self);
-    RefPtr<WebCore::Promise> gobjectResult = WTF::getPtr(item->testPromiseFunction());
-    return WebKit::kit(gobjectResult.get());
-}
-
 glong webkit_dom_test_obj_get_read_only_long_attr(WebKitDOMTestObj* self)
 {
     WebCore::JSMainThreadNullState state;

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (185693 => 185694)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h	2015-06-18 06:30:06 UTC (rev 185693)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h	2015-06-18 07:02:58 UTC (rev 185694)
@@ -651,17 +651,6 @@
 webkit_dom_test_obj_any(WebKitDOMTestObj* self, gfloat a, glong b);
 
 /**
- * webkit_dom_test_obj_test_promise_function:
- * @self: A #WebKitDOMTestObj
- *
- * Returns: (transfer none): A #WebKitDOMPromise
- *
- * Stability: Unstable
-**/
-WEBKIT_API WebKitDOMPromise*
-webkit_dom_test_obj_test_promise_function(WebKitDOMTestObj* self);
-
-/**
  * webkit_dom_test_obj_get_read_only_long_attr:
  * @self: A #WebKitDOMTestObj
  *

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (185693 => 185694)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h	2015-06-18 06:30:06 UTC (rev 185693)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h	2015-06-18 07:02:58 UTC (rev 185694)
@@ -173,5 +173,4 @@
 - (void)variadicDoubleMethod:(double)head tail:(double)tail;
 - (void)variadicNodeMethod:(DOMNode *)head tail:(DOMNode *)tail;
 - (void)any:(float)a b:(int)b;
-- (DOMPromise *)testPromiseFunction;
 @end

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (185693 => 185694)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm	2015-06-18 06:30:06 UTC (rev 185693)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm	2015-06-18 07:02:58 UTC (rev 185694)
@@ -1183,12 +1183,6 @@
     IMPL->any(a, b);
 }
 
-- (DOMPromise *)testPromiseFunction
-{
-    WebCore::JSMainThreadNullState state;
-    return kit(WTF::getPtr(IMPL->testPromiseFunction()));
-}
-
 @end
 
 WebCore::TestObj* core(DOMTestObj *wrapper)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to