Changeset 147480 in webkit
- Timestamp:
- Apr 2, 2013 11:54:53 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147478 r147480 1 2013-04-02 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r147464. 4 http://trac.webkit.org/changeset/147464 5 https://bugs.webkit.org/show_bug.cgi?id=113812 6 7 JSSQLResultSet.cpp:131:24: error: implicit conversion loses 8 integer precision: 'int64_t' (aka 'long long') to 'int' 9 [-Werror,-Wshorten-64-to-32] (Requested by xenon on #webkit). 10 11 * bindings/scripts/CodeGeneratorJS.pm: 12 (GenerateImplementation): 13 * bindings/scripts/test/JS/JSTestObj.cpp: 14 (WebCore::jsTestObjAttrWithGetterException): 15 (WebCore::jsTestObjStringAttrWithGetterException): 16 (WebCore::jsTestObjWithScriptStateAttributeRaises): 17 (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises): 18 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): 19 (WebCore::jsTestObjNullableDoubleAttribute): 20 (WebCore::jsTestObjNullableLongAttribute): 21 (WebCore::jsTestObjNullableBooleanAttribute): 22 (WebCore::jsTestObjNullableStringAttribute): 23 (WebCore::jsTestObjNullableLongSettableAttribute): 24 (WebCore::jsTestObjNullableStringValue): 25 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 26 (WebCore::jsTestTypedefsAttrWithGetterException): 27 (WebCore::jsTestTypedefsStringAttrWithGetterException): 28 1 29 2013-04-02 Andrey Lushnikov <lushnikov@chromium.org> 2 30 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r147464 r147480 1824 1824 my $type = $attribute->signature->type; 1825 1825 my $isNullable = $attribute->signature->isNullable; 1826 my $isCachedAttribute = $attribute->signature->extendedAttributes->{"CachedAttribute"};1827 1826 $codeGenerator->AssertNotSequenceType($type); 1828 1827 my $getFunctionName = GetAttributeGetterName($interfaceName, $className, $attribute); … … 1841 1840 } 1842 1841 1843 if ($ isCachedAttribute) {1842 if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) { 1844 1843 $needsMarkChildren = 1; 1845 1844 } … … 1890 1889 1891 1890 my $cacheIndex = 0; 1892 if ($ isCachedAttribute) {1891 if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) { 1893 1892 $cacheIndex = $currentCachedAttribute; 1894 1893 $currentCachedAttribute++; … … 1898 1897 1899 1898 my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()"); 1900 my $returnValue = "result";1901 1899 1902 1900 if ($svgListPropertyType) { … … 1926 1924 unshift(@arguments, @callWithArgs); 1927 1925 1926 my $jsType = NativeToJSValue($attribute->signature, 0, $interfaceName, "${functionName}(" . join(", ", @arguments) . ")", "castedThis"); 1928 1927 push(@implContent, " $interfaceName* impl = static_cast<$interfaceName*>(castedThis->impl());\n") if !$attribute->isStatic; 1928 if ($codeGenerator->IsSVGAnimatedType($type)) { 1929 push(@implContent, " RefPtr<$type> obj = $jsType;\n"); 1930 push(@implContent, " JSValue result = toJS(exec, castedThis->globalObject(), obj.get());\n"); 1931 } else { 1932 push(@implContent, " JSValue result = $jsType;\n"); 1933 } 1934 1929 1935 if ($isNullable) { 1930 my $nativeType = GetNativeType($type);1931 push(@implContent, " $nativeType nativeResult = " . NativeValueToLocal("$functionName(" . join(", ", @arguments) . ")", $nativeType) . ";\n");1932 1936 push(@implContent, " if (isNull)\n"); 1933 1937 push(@implContent, " return jsNull();\n"); 1934 if ($isCachedAttribute) {1935 push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "nativeResult", "castedThis") . ";\n");1936 } else {1937 $returnValue = NativeToJSValue($attribute->signature, 0, $interfaceName, "nativeResult", "castedThis");1938 }1939 } else {1940 my $jsType = NativeToJSValue($attribute->signature, 0, $interfaceName, "${functionName}(" . join(", ", @arguments) . ")", "castedThis");1941 if ($codeGenerator->IsSVGAnimatedType($type)) {1942 push(@implContent, " RefPtr<$type> obj = $jsType;\n");1943 push(@implContent, " JSValue result = toJS(exec, castedThis->globalObject(), obj.get());\n");1944 } else {1945 push(@implContent, " JSValue result = $jsType;\n");1946 }1947 1938 } 1948 1939 } 1949 1940 1950 push(@implContent, " castedThis->m_" . $attribute->signature->name . ".set(exec->globalData(), castedThis, result);\n") if $isCachedAttribute;1951 push(@implContent, " return $returnValue;\n");1941 push(@implContent, " castedThis->m_" . $attribute->signature->name . ".set(exec->globalData(), castedThis, result);\n") if ($attribute->signature->extendedAttributes->{"CachedAttribute"}); 1942 push(@implContent, " return result;\n"); 1952 1943 1953 1944 } else { … … 1961 1952 1962 1953 unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()")); 1963 my $nativeType = GetNativeType($type);1964 1954 1965 1955 if ($svgPropertyOrListPropertyType) { 1966 1956 push(@implContent, " $svgPropertyOrListPropertyType impl(*castedThis->impl());\n"); 1967 push(@implContent, " $nativeType nativeResult = " . NativeValueToLocal("impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", $nativeType) . ";\n");1957 push(@implContent, " JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n"); 1968 1958 } else { 1969 1959 push(@implContent, " $interfaceName* impl = static_cast<$interfaceName*>(castedThis->impl());\n"); 1970 push(@implContent, " $nativeType nativeResult = " . NativeValueToLocal("impl->$implGetterFunctionName(" . join(", ", @arguments) . ")", $nativeType) . ";\n");1960 push(@implContent, " JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl->$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n"); 1971 1961 } 1972 1962 … … 1977 1967 1978 1968 push(@implContent, " setDOMException(exec, ec);\n"); 1979 push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $interfaceName, "nativeResult", "castedThis") . ";\n");1969 push(@implContent, " return result;\n"); 1980 1970 } 1981 1971 … … 3208 3198 } 3209 3199 3210 sub NativeValueToLocal3211 {3212 my $value = shift;3213 my $type = shift;3214 3215 return "WTF::getPtr($value)" if $type =~ /\*$/;3216 return $value;3217 }3218 3219 3200 sub JSValueToNative 3220 3201 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r147464 r147480 658 658 ExceptionCode ec = 0; 659 659 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 660 int nativeResult = impl->attrWithGetterException(ec);660 JSC::JSValue result = jsNumber(impl->attrWithGetterException(ec)); 661 661 setDOMException(exec, ec); 662 return jsNumber(nativeResult);662 return result; 663 663 } 664 664 … … 679 679 ExceptionCode ec = 0; 680 680 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 681 const String& nativeResult = impl->stringAttrWithGetterException(ec);681 JSC::JSValue result = jsStringWithCache(exec, impl->stringAttrWithGetterException(ec)); 682 682 setDOMException(exec, ec); 683 return jsStringWithCache(exec, nativeResult);683 return result; 684 684 } 685 685 … … 728 728 ExceptionCode ec = 0; 729 729 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 730 TestObj* nativeResult = WTF::getPtr(impl->withScriptStateAttributeRaises(exec, ec));730 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptStateAttributeRaises(exec, ec))); 731 731 setDOMException(exec, ec); 732 return toJS(exec, castedThis->globalObject(), WTF::getPtr(nativeResult));732 return result; 733 733 } 734 734 … … 742 742 return jsUndefined(); 743 743 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 744 TestObj* nativeResult = WTF::getPtr(impl->withScriptExecutionContextAttributeRaises(scriptContext, ec));744 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAttributeRaises(scriptContext, ec))); 745 745 setDOMException(exec, ec); 746 return toJS(exec, castedThis->globalObject(), WTF::getPtr(nativeResult));746 return result; 747 747 } 748 748 … … 768 768 return jsUndefined(); 769 769 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 770 TestObj* nativeResult = WTF::getPtr(impl->withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec));770 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec))); 771 771 setDOMException(exec, ec); 772 return toJS(exec, castedThis->globalObject(), WTF::getPtr(nativeResult));772 return result; 773 773 } 774 774 … … 988 988 bool isNull = false; 989 989 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 990 double nativeResult = impl->nullableDoubleAttribute(isNull);990 JSValue result = jsNumber(impl->nullableDoubleAttribute(isNull)); 991 991 if (isNull) 992 992 return jsNull(); 993 return jsNumber(nativeResult);993 return result; 994 994 } 995 995 … … 1001 1001 bool isNull = false; 1002 1002 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 1003 int nativeResult = impl->nullableLongAttribute(isNull);1003 JSValue result = jsNumber(impl->nullableLongAttribute(isNull)); 1004 1004 if (isNull) 1005 1005 return jsNull(); 1006 return jsNumber(nativeResult);1006 return result; 1007 1007 } 1008 1008 … … 1014 1014 bool isNull = false; 1015 1015 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 1016 bool nativeResult = impl->nullableBooleanAttribute(isNull);1016 JSValue result = jsBoolean(impl->nullableBooleanAttribute(isNull)); 1017 1017 if (isNull) 1018 1018 return jsNull(); 1019 return jsBoolean(nativeResult);1019 return result; 1020 1020 } 1021 1021 … … 1027 1027 bool isNull = false; 1028 1028 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 1029 const String& nativeResult = impl->nullableStringAttribute(isNull);1029 JSValue result = jsStringWithCache(exec, impl->nullableStringAttribute(isNull)); 1030 1030 if (isNull) 1031 1031 return jsNull(); 1032 return jsStringWithCache(exec, nativeResult);1032 return result; 1033 1033 } 1034 1034 … … 1040 1040 bool isNull = false; 1041 1041 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 1042 int nativeResult = impl->nullableLongSettableAttribute(isNull);1042 JSValue result = jsNumber(impl->nullableLongSettableAttribute(isNull)); 1043 1043 if (isNull) 1044 1044 return jsNull(); 1045 return jsNumber(nativeResult);1045 return result; 1046 1046 } 1047 1047 … … 1053 1053 bool isNull = false; 1054 1054 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 1055 int nativeResult = impl->nullableStringValue(isNull, ec);1055 JSC::JSValue result = jsNumber(impl->nullableStringValue(isNull, ec)); 1056 1056 if (isNull) 1057 1057 return jsNull(); 1058 1058 setDOMException(exec, ec); 1059 return jsNumber(nativeResult);1059 return result; 1060 1060 } 1061 1061 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r147464 r147480 226 226 ExceptionCode ec = 0; 227 227 TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl()); 228 int nativeResult = impl->attrWithGetterException(ec);228 JSC::JSValue result = jsNumber(impl->attrWithGetterException(ec)); 229 229 setDOMException(exec, ec); 230 return jsNumber(nativeResult);230 return result; 231 231 } 232 232 … … 247 247 ExceptionCode ec = 0; 248 248 TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl()); 249 const String& nativeResult = impl->stringAttrWithGetterException(ec);249 JSC::JSValue result = jsStringWithCache(exec, impl->stringAttrWithGetterException(ec)); 250 250 setDOMException(exec, ec); 251 return jsStringWithCache(exec, nativeResult);251 return result; 252 252 } 253 253
Note: See TracChangeset
for help on using the changeset viewer.