Changeset 87374 in webkit


Ignore:
Timestamp:
May 26, 2011 4:46:48 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-26 Andreas Kling <kling@webkit.org>

Reviewed by Darin Adler.

JSC DOM bindings: Use isUndefinedOrNull() instead of (isNull()
isUndefined()).

https://bugs.webkit.org/show_bug.cgi?id=61472

  • bindings/scripts/CodeGeneratorJS.pm:
  • bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined. (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87372 r87374  
     12011-05-26  Andreas Kling  <kling@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        JSC DOM bindings: Use isUndefinedOrNull() instead of (isNull() || isUndefined()).
     6        https://bugs.webkit.org/show_bug.cgi?id=61472
     7
     8        * bindings/scripts/CodeGeneratorJS.pm:
     9        * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
     10        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
     11        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
     12
    1132011-05-26  Keishi Hattori  <keishi@webkit.org>
    214
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r86785 r87374  
    11521152        # be converted to a string via .toString).
    11531153        if ($codeGenerator->IsStringType($type)) {
    1154             push(@andExpression, "(${value}.isNull() || ${value}.isUndefined() || ${value}.isString() || ${value}.isObject())");
     1154            push(@andExpression, "(${value}.isUndefinedOrNull() || ${value}.isString() || ${value}.isObject())");
    11551155        } elsif ($parameter->extendedAttributes->{"Callback"}) {
    11561156            # For Callbacks only checks if the value is null or object.
     
    20102010                            if ($parameter->extendedAttributes->{"Optional"}) {
    20112011                                push(@implContent, "    RefPtr<$argType> $name;\n");
    2012                                 push(@implContent, "    if (exec->argumentCount() > $argsIndex && !exec->argument($argsIndex).isNull() && !exec->argument($argsIndex).isUndefined()) {\n");
     2012                                push(@implContent, "    if (exec->argumentCount() > $argsIndex && !exec->argument($argsIndex).isUndefinedOrNull()) {\n");
    20132013                                push(@implContent, "        if (!exec->argument($argsIndex).isObject()) {\n");
    20142014                                push(@implContent, "            setDOMException(exec, TYPE_MISMATCH_ERR);\n");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r87360 r87374  
    15111511    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
    15121512    RefPtr<TestCallback> callback;
    1513     if (exec->argumentCount() > 0 && !exec->argument(0).isNull() && !exec->argument(0).isUndefined()) {
     1513    if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull()) {
    15141514        if (!exec->argument(0).isObject()) {
    15151515            setDOMException(exec, TYPE_MISMATCH_ERR);
     
    16201620EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec)
    16211621{
    1622     if ((exec->argumentCount() == 2 && (exec->argument(0).isNull() || (exec->argument(0).isObject() && asObject(exec->argument(0))->inherits(&JSTestObj::s_info))) && (exec->argument(1).isNull() || exec->argument(1).isUndefined() || exec->argument(1).isString() || exec->argument(1).isObject())))
     1622    if ((exec->argumentCount() == 2 && (exec->argument(0).isNull() || (exec->argument(0).isObject() && asObject(exec->argument(0))->inherits(&JSTestObj::s_info))) && (exec->argument(1).isUndefinedOrNull() || exec->argument(1).isString() || exec->argument(1).isObject())))
    16231623        return jsTestObjPrototypeFunctionOverloadedMethod1(exec);
    16241624    if ((exec->argumentCount() == 1 && (exec->argument(0).isNull() || (exec->argument(0).isObject() && asObject(exec->argument(0))->inherits(&JSTestObj::s_info)))) || (exec->argumentCount() == 2 && (exec->argument(0).isNull() || (exec->argument(0).isObject() && asObject(exec->argument(0))->inherits(&JSTestObj::s_info)))))
    16251625        return jsTestObjPrototypeFunctionOverloadedMethod2(exec);
    1626     if ((exec->argumentCount() == 1 && (exec->argument(0).isNull() || exec->argument(0).isUndefined() || exec->argument(0).isString() || exec->argument(0).isObject())))
     1626    if ((exec->argumentCount() == 1 && (exec->argument(0).isUndefinedOrNull() || exec->argument(0).isString() || exec->argument(0).isObject())))
    16271627        return jsTestObjPrototypeFunctionOverloadedMethod3(exec);
    16281628    if (exec->argumentCount() == 1)
Note: See TracChangeset for help on using the changeset viewer.