[Web IDL] Add support for 'any' type in dictionaries
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Aug 2016 02:33:08 +0000 (02:33 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Aug 2016 02:33:08 +0000 (02:33 +0000)
commitc0aeaa6fcc4234ae3163da944baa9b1827add362
treed99fc5d74d0320467aa4e336c66442b380f166ba
parent8a849f75bf3054a35f31f3a282c928d536844f2b
[Web IDL] Add support for 'any' type in dictionaries
https://bugs.webkit.org/show_bug.cgi?id=160511

Reviewed by Sam Weinig.

Add support for 'any' type in dictionaries. It will pass the value as
a JSValue to the implementation. If the member is not present, it will
pass jsUndefined() to the implementation.

Having 'any' support in dictionaries is a convenient workaround for
types we don't support yet (e.g. union types).

No new tests, updated bindings tests.

* bindings/js/JSDOMConvert.h:
(WebCore::Converter<JSC::JSValue>::convert):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::convert<TestObj::Dictionary>):
* bindings/scripts/test/TestObj.idl:

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