Reviewers: Yuki, haraken
CL:
https://codereview.chromium.org/2183623004/Message:
PTAL
Description:
Add IDLDictionaryBase
Before this CL, given an IDL dictionary (e.g. FooDictionary)
the code generator generated ToV8() directly.
This is problematic when Blink wants to pass a
sub-dictionary of FooDictionary because generated
ToV8() doesn't convert members defined in the
sub-dictionary.
To solve this problem, add a base class which
provides toV8Impl() virtual function. The code
generator overrides toV8Impl() and ToV8() uses
them. ToV8() automatically calls appropriate
toV8Impl().
BUG=630210
Base URL:
https://chromium.googlesource.com/chromium/src.git@masterAffected files (+93, -20 lines):
A third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h
A third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.cpp
M third_party/WebKit/Source/bindings/core/v8/ToV8.h
M third_party/WebKit/Source/bindings/core/v8/v8.gypi
M third_party/WebKit/Source/bindings/scripts/v8_dictionary.py
M third_party/WebKit/Source/bindings/templates/dictionary_impl.h
M third_party/WebKit/Source/bindings/templates/dictionary_v8.h
M third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.h
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.cpp
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionaryDerivedImplementedAs.h
M third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceEventInit.h
M third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.h
M third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.cpp
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.h
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionaryDerived.h
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInit.h
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
M third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.h
M third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp