Changeset 61937 in webkit


Ignore:
Timestamp:
Jun 25, 2010 8:40:09 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-06-25 Sterling Swigart <sswigart@google.com>

Reviewed by David Levin.

Callback code generation fixed so that now string parameters are converted to JSString
using the jsString method instead of the toJS method which would not compile.
https://bugs.webkit.org/show_bug.cgi?id=41119

  • bindings/scripts/CodeGeneratorJS.pm: Now generates jsString for String parameters in callbacks.
  • bindings/scripts/test/JS/JSTestCallback.cpp: Fixed test for above. (WebCore::JSTestCallback::callbackWithClass2Param): Ditto.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r61934 r61937  
     12010-06-25  Sterling Swigart  <sswigart@google.com>
     2
     3        Reviewed by David Levin.
     4
     5        Callback code generation fixed so that now string parameters are converted to JSString
     6        using the jsString method instead of the toJS method which would not compile.
     7        https://bugs.webkit.org/show_bug.cgi?id=41119
     8       
     9        * bindings/scripts/CodeGeneratorJS.pm: Now generates jsString for String parameters in callbacks.
     10        * bindings/scripts/test/JS/JSTestCallback.cpp: Fixed test for above.
     11        (WebCore::JSTestCallback::callbackWithClass2Param): Ditto.
     12
    1132010-06-25  Zhenyao Mo  <zmo@google.com>
    214
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r61413 r61937  
    21802180            foreach my $param (@params) {
    21812181                my $paramName = $param->name;
    2182                 push(@implContent, "    args.append(toJS(exec, ${paramName}));\n");
     2182                if ($param->type eq "DOMString") {
     2183                    push(@implContent, "    args.append(jsString(exec, ${paramName}));\n");
     2184                } else {
     2185                    push(@implContent, "    args.append(toJS(exec, ${paramName}));\n");
     2186                }
    21832187            }
    21842188
  • trunk/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp

    r59104 r61937  
    9090    MarkedArgumentBuffer args;
    9191    args.append(toJS(exec, class2Param));
    92     args.append(toJS(exec, strArg));
     92    args.append(jsString(exec, strArg));
    9393
    9494    bool raisedException = false;
Note: See TracChangeset for help on using the changeset viewer.