Changeset 87374 in webkit
- Timestamp:
- May 26, 2011 4:46:48 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r87372 r87374 1 2011-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 1 13 2011-05-26 Keishi Hattori <keishi@webkit.org> 2 14 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r86785 r87374 1152 1152 # be converted to a string via .toString). 1153 1153 if ($codeGenerator->IsStringType($type)) { 1154 push(@andExpression, "(${value}.is Null() || ${value}.isUndefined() || ${value}.isString() || ${value}.isObject())");1154 push(@andExpression, "(${value}.isUndefinedOrNull() || ${value}.isString() || ${value}.isObject())"); 1155 1155 } elsif ($parameter->extendedAttributes->{"Callback"}) { 1156 1156 # For Callbacks only checks if the value is null or object. … … 2010 2010 if ($parameter->extendedAttributes->{"Optional"}) { 2011 2011 push(@implContent, " RefPtr<$argType> $name;\n"); 2012 push(@implContent, " if (exec->argumentCount() > $argsIndex && !exec->argument($argsIndex).is Null() && !exec->argument($argsIndex).isUndefined()) {\n");2012 push(@implContent, " if (exec->argumentCount() > $argsIndex && !exec->argument($argsIndex).isUndefinedOrNull()) {\n"); 2013 2013 push(@implContent, " if (!exec->argument($argsIndex).isObject()) {\n"); 2014 2014 push(@implContent, " setDOMException(exec, TYPE_MISMATCH_ERR);\n"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r87360 r87374 1511 1511 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 1512 1512 RefPtr<TestCallback> callback; 1513 if (exec->argumentCount() > 0 && !exec->argument(0).is Null() && !exec->argument(0).isUndefined()) {1513 if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull()) { 1514 1514 if (!exec->argument(0).isObject()) { 1515 1515 setDOMException(exec, TYPE_MISMATCH_ERR); … … 1620 1620 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec) 1621 1621 { 1622 if ((exec->argumentCount() == 2 && (exec->argument(0).isNull() || (exec->argument(0).isObject() && asObject(exec->argument(0))->inherits(&JSTestObj::s_info))) && (exec->argument(1).is Null() || 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()))) 1623 1623 return jsTestObjPrototypeFunctionOverloadedMethod1(exec); 1624 1624 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))))) 1625 1625 return jsTestObjPrototypeFunctionOverloadedMethod2(exec); 1626 if ((exec->argumentCount() == 1 && (exec->argument(0).is Null() || 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()))) 1627 1627 return jsTestObjPrototypeFunctionOverloadedMethod3(exec); 1628 1628 if (exec->argumentCount() == 1)
Note: See TracChangeset
for help on using the changeset viewer.