JS binding generator should create a member variable for each Promise attribute of...
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2015 17:39:11 +0000 (17:39 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2015 17:39:11 +0000 (17:39 +0000)
commit3539ee5f530c17cd84993e81aa1eea7e188762a4
tree9f1b50142033eac16885fa6ee17c826f6880b924
parent6a06525a390966557171c335712cd4570f67612f
JS binding generator should create a member variable for each Promise attribute of an interface
https://bugs.webkit.org/show_bug.cgi?id=145056

Reviewed by Darin Adler.

For each attribute XXX whose type is Promise, a member m_XXXPromiseDeferred is created, its type being a JSC::Strong of JSPromiseDeferred.
The purpose is to enable custom getters to create the JSPromiseDeferred and store ino the class member to ensure the same promise is returned each time
the custom getter is called.
This patch will enable simplifying ReadableStreamReader custom binding.

Covered by added attribute in TestObj.idl.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_get_property):
(webkit_dom_test_obj_class_init):
(webkit_dom_test_obj_get_test_promise_attr):
(webkit_dom_test_obj_set_nullable_string_value): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjTestPromiseAttr):
(WebCore::jsTestObjAttributeWithReservedEnumType): Deleted.
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj testPromiseAttr]):
(-[DOMTestObj attribute]): Deleted.
* bindings/scripts/test/TestObj.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
Source/WebCore/bindings/scripts/test/TestObj.idl