Changeset 70411 in webkit
- Timestamp:
- Oct 24, 2010 4:58:15 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r70410 r70411 1 2010-10-24 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Dirk Schulze. 4 5 Convert SVGAngle to the new SVGPropertyTearOff concept, reimplement it properly 6 https://bugs.webkit.org/show_bug.cgi?id=48179 7 8 Speculative fix for the WebGL tests, I was not aware they're not run on Leopard, so I missed the breakage. 9 10 * bindings/scripts/CodeGeneratorJS.pm: Restore the order of type checking in the 'StrictTypeChecking' code. 11 * bindings/scripts/CodeGeneratorV8.pm: Ditto. 12 1 13 2010-10-23 Nikolas Zimmermann <nzimmermann@rim.com> 2 14 -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r70410 r70411 1812 1812 if ($attribute->signature->extendedAttributes->{"StrictTypeChecking"}) { 1813 1813 my $argType = $attribute->signature->type; 1814 if ($codeGenerator->IsStringType($argType)) { 1814 if (!IsNativeType($argType)) { 1815 push(@implContent, " if (!value.isUndefinedOrNull() && !value.inherits(&JS${argType}::s_info)) {\n"); 1816 push(@implContent, " throwVMTypeError(exec);\n"); 1817 push(@implContent, " return;\n"); 1818 push(@implContent, " };\n"); 1819 } elsif ($codeGenerator->IsStringType($argType)) { 1815 1820 push(@implContent, " if (!value.isUndefinedOrNull() && !value.isString() && !value.isObject()) {\n"); 1816 1821 push(@implContent, " throwVMTypeError(exec);\n"); … … 1819 1824 } elsif ($codeGenerator->IsNumericType($argType)) { 1820 1825 push(@implContent, " if (!value.isUndefinedOrNull() && !value.isNumber()) {\n"); 1821 push(@implContent, " throwVMTypeError(exec);\n");1822 push(@implContent, " return;\n");1823 push(@implContent, " };\n");1824 } elsif (!IsNativeType($argType)) {1825 push(@implContent, " if (!value.isUndefinedOrNull() && !value.inherits(&JS${argType}::s_info)) {\n");1826 1826 push(@implContent, " throwVMTypeError(exec);\n"); 1827 1827 push(@implContent, " return;\n"); … … 2079 2079 if ($function->signature->extendedAttributes->{"StrictTypeChecking"}) { 2080 2080 my $argValue = "exec->argument($argsIndex)"; 2081 if ($codeGenerator->IsStringType($argType)) { 2081 if (!IsNativeType($argType)) { 2082 push(@implContent, " if (exec->argumentCount() > $argsIndex && !${argValue}.isUndefinedOrNull() && !${argValue}.inherits(&JS${argType}::s_info))\n"); 2083 push(@implContent, " return throwVMTypeError(exec);\n"); 2084 } elsif ($codeGenerator->IsStringType($argType)) { 2082 2085 push(@implContent, " if (exec->argumentCount() > $argsIndex && !${argValue}.isUndefinedOrNull() && !${argValue}.isString() && !${argValue}.isObject())\n"); 2083 2086 push(@implContent, " return throwVMTypeError(exec);\n"); … … 2085 2088 push(@implContent, " if (exec->argumentCount() > $argsIndex && !${argValue}.isUndefinedOrNull() && !${argValue}.isNumber())\n"); 2086 2089 push(@implContent, " return throwVMTypeError(exec);\n"); 2087 } elsif (!IsNativeType($argType)) { 2088 push(@implContent, " if (exec->argumentCount() > $argsIndex && !${argValue}.isUndefinedOrNull() && !${argValue}.inherits(&JS${argType}::s_info))\n"); 2089 push(@implContent, " return throwVMTypeError(exec);\n"); 2090 } 2090 } 2091 2091 } 2092 2092 -
trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm
r70410 r70411 943 943 if ($attribute->signature->extendedAttributes->{"StrictTypeChecking"}) { 944 944 my $argType = GetTypeFromSignature($attribute->signature); 945 if ($codeGenerator->IsStringType($argType)) { 945 if (IsWrapperType($argType)) { 946 push(@implContentDecls, " if (!isUndefinedOrNull(value) && !V8${argType}::HasInstance(value)) {\n"); 947 push(@implContentDecls, " V8Proxy::throwTypeError();\n"); 948 push(@implContentDecls, " return;\n"); 949 push(@implContentDecls, " }\n"); 950 } elsif ($codeGenerator->IsStringType($argType)) { 946 951 push(@implContentDecls, " if (!isUndefinedOrNull(value) && !value->IsString() && !value->IsObject()) {\n"); 947 952 push(@implContentDecls, " V8Proxy::throwTypeError();\n"); … … 950 955 } elsif ($codeGenerator->IsNumericType($argType)) { 951 956 push(@implContentDecls, " if (!isUndefinedOrNull(value) && !value->IsNumber()) {\n"); 952 push(@implContentDecls, " V8Proxy::throwTypeError();\n");953 push(@implContentDecls, " return;\n");954 push(@implContentDecls, " }\n");955 } elsif (IsWrapperType($argType)) {956 push(@implContentDecls, " if (!isUndefinedOrNull(value) && !V8${argType}::HasInstance(value)) {\n");957 957 push(@implContentDecls, " V8Proxy::throwTypeError();\n"); 958 958 push(@implContentDecls, " return;\n"); … … 1407 1407 my $argValue = "args[$paramIndex]"; 1408 1408 my $argType = GetTypeFromSignature($parameter); 1409 if ($codeGenerator->IsStringType($argType)) { 1409 if (IsWrapperType($argType)) { 1410 push(@implContentDecls, " if (args.Length() > $paramIndex && !isUndefinedOrNull($argValue) && !V8${argType}::HasInstance($argValue)) {\n"); 1411 push(@implContentDecls, " V8Proxy::throwTypeError();\n"); 1412 push(@implContentDecls, " return notHandledByInterceptor();\n"); 1413 push(@implContentDecls, " }\n"); 1414 } elsif ($codeGenerator->IsStringType($argType)) { 1410 1415 push(@implContentDecls, " if (args.Length() > $paramIndex && !isUndefinedOrNull($argValue) && !${argValue}->IsString() && !${argValue}->IsObject()) {\n"); 1411 1416 push(@implContentDecls, " V8Proxy::throwTypeError();\n"); … … 1414 1419 } elsif ($codeGenerator->IsNumericType($argType)) { 1415 1420 push(@implContentDecls, " if (args.Length() > $paramIndex && !isUndefinedOrNull($argValue) && !${argValue}->IsNumber()) {\n"); 1416 push(@implContentDecls, " V8Proxy::throwTypeError();\n");1417 push(@implContentDecls, " return notHandledByInterceptor();\n");1418 push(@implContentDecls, " }\n");1419 } elsif (IsWrapperType($argType)) {1420 push(@implContentDecls, " if (args.Length() > $paramIndex && !isUndefinedOrNull($argValue) && !V8${argType}::HasInstance($argValue)) {\n");1421 1421 push(@implContentDecls, " V8Proxy::throwTypeError();\n"); 1422 1422 push(@implContentDecls, " return notHandledByInterceptor();\n");
Note: See TracChangeset
for help on using the changeset viewer.