Changeset 207243 in webkit


Ignore:
Timestamp:
Oct 12, 2016 2:09:46 PM (8 years ago)
Author:
Chris Dumez
Message:

[Web IDL] Generated bindings include the wrong header when ImplementedAs is used on a dictionary
https://bugs.webkit.org/show_bug.cgi?id=163352

Reviewed by Ryosuke Niwa.

Generated bindings include the wrong header when ImplementedAs is used
on a dictionary.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryHeader):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterCaller):

  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:

(WebCore::convertDictionary<DictionaryImplName>):
(WebCore::convertDictionary<TestStandaloneDictionary>): Deleted.

  • bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
  • bindings/scripts/test/TestStandaloneDictionary.idl:
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207239 r207243  
     12016-10-12  Chris Dumez  <cdumez@apple.com>
     2
     3        [Web IDL] Generated bindings include the wrong header when ImplementedAs is used on a dictionary
     4        https://bugs.webkit.org/show_bug.cgi?id=163352
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Generated bindings include the wrong header when ImplementedAs is used
     9        on a dictionary.
     10
     11        * bindings/scripts/CodeGeneratorJS.pm:
     12        (GenerateDictionaryHeader):
     13        * bindings/scripts/test/JS/JSTestObj.cpp:
     14        (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterCaller):
     15        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
     16        (WebCore::convertDictionary<DictionaryImplName>):
     17        (WebCore::convertDictionary<TestStandaloneDictionary>): Deleted.
     18        * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
     19        * bindings/scripts/test/TestStandaloneDictionary.idl:
     20
    1212016-10-12  Yusuke Suzuki  <utatane.tea@gmail.com>
    222
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r207239 r207243  
    43664366    push(@headerContentHeader, GenerateHeaderContentHeader($dictionary));
    43674367
    4368     $headerIncludes{"$dictionaryName.h"} = 1;
     4368    $headerIncludes{"$className.h"} = 1;
    43694369    $headerIncludes{"JSDOMConvert.h"} = 1;
    43704370
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r207193 r207243  
    77147714    if (UNLIKELY(state->argumentCount() < 1))
    77157715        return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
    7716     auto dict = convert<IDLDictionary<TestStandaloneDictionary>>(*state, state->uncheckedArgument(0));
     7716    auto dict = convert<IDLDictionary<DictionaryImplName>>(*state, state->uncheckedArgument(0));
    77177717    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
    77187718    impl.operationWithExternalDictionaryParameter(dict.value());
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp

    r207150 r207243  
    2727namespace WebCore {
    2828
    29 template<> Optional<TestStandaloneDictionary> convertDictionary<TestStandaloneDictionary>(ExecState& state, JSValue value)
     29template<> Optional<DictionaryImplName> convertDictionary<DictionaryImplName>(ExecState& state, JSValue value)
    3030{
    3131    VM& vm = state.vm();
     
    4141        return Nullopt;
    4242    }
    43     TestStandaloneDictionary result;
     43    DictionaryImplName result;
    4444    JSValue boolMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "boolMember"));
    4545    if (!boolMemberValue.isUndefined()) {
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h

    r206877 r207243  
    2121#pragma once
    2222
     23#include "DictionaryImplName.h"
    2324#include "JSDOMConvert.h"
    24 #include "TestStandaloneDictionary.h"
    2525
    2626namespace WebCore {
    2727
    28 template<> Optional<TestStandaloneDictionary> convertDictionary<TestStandaloneDictionary>(JSC::ExecState&, JSC::JSValue);
     28template<> Optional<DictionaryImplName> convertDictionary<DictionaryImplName>(JSC::ExecState&, JSC::JSValue);
    2929
    3030} // namespace WebCore
  • trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl

    r206877 r207243  
    2727 */
    2828
    29 dictionary TestStandaloneDictionary {
     29[
     30    ImplementedAs=DictionaryImplName,
     31] dictionary TestStandaloneDictionary {
    3032    boolean boolMember;
    3133    DOMString stringMember;
Note: See TracChangeset for help on using the changeset viewer.