Changeset 147480 in webkit


Ignore:
Timestamp:
Apr 2, 2013 11:54:53 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r147464.
http://trac.webkit.org/changeset/147464
https://bugs.webkit.org/show_bug.cgi?id=113812

JSSQLResultSet.cpp:131:24: error: implicit conversion loses
integer precision: 'int64_t' (aka 'long long') to 'int'
[-Werror,-Wshorten-64-to-32] (Requested by xenon on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-04-02

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjWithScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjNullableDoubleAttribute):
(WebCore::jsTestObjNullableLongAttribute):
(WebCore::jsTestObjNullableBooleanAttribute):
(WebCore::jsTestObjNullableStringAttribute):
(WebCore::jsTestObjNullableLongSettableAttribute):
(WebCore::jsTestObjNullableStringValue):

  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::jsTestTypedefsAttrWithGetterException):
(WebCore::jsTestTypedefsStringAttrWithGetterException):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147478 r147480  
     12013-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
    1292013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
    230
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r147464 r147480  
    18241824                my $type = $attribute->signature->type;
    18251825                my $isNullable = $attribute->signature->isNullable;
    1826                 my $isCachedAttribute = $attribute->signature->extendedAttributes->{"CachedAttribute"};
    18271826                $codeGenerator->AssertNotSequenceType($type);
    18281827                my $getFunctionName = GetAttributeGetterName($interfaceName, $className, $attribute);
     
    18411840                }
    18421841
    1843                 if ($isCachedAttribute) {
     1842                if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) {
    18441843                    $needsMarkChildren = 1;
    18451844                }
     
    18901889
    18911890                    my $cacheIndex = 0;
    1892                     if ($isCachedAttribute) {
     1891                    if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) {
    18931892                        $cacheIndex = $currentCachedAttribute;
    18941893                        $currentCachedAttribute++;
     
    18981897
    18991898                    my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()");
    1900                     my $returnValue = "result";
    19011899
    19021900                    if ($svgListPropertyType) {
     
    19261924                        unshift(@arguments, @callWithArgs);
    19271925
     1926                        my $jsType = NativeToJSValue($attribute->signature, 0, $interfaceName, "${functionName}(" . join(", ", @arguments) . ")", "castedThis");
    19281927                        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
    19291935                        if ($isNullable) {
    1930                             my $nativeType = GetNativeType($type);
    1931                             push(@implContent, "    $nativeType nativeResult = " . NativeValueToLocal("$functionName(" . join(", ", @arguments) . ")", $nativeType) . ";\n");
    19321936                            push(@implContent, "    if (isNull)\n");
    19331937                            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                             }
    19471938                        }
    19481939                    }
    19491940
    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");
    19521943
    19531944                } else {
     
    19611952
    19621953                    unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()"));
    1963                     my $nativeType = GetNativeType($type);
    19641954
    19651955                    if ($svgPropertyOrListPropertyType) {
    19661956                        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");
    19681958                    } else {
    19691959                        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");
    19711961                    }
    19721962
     
    19771967
    19781968                    push(@implContent, "    setDOMException(exec, ec);\n");
    1979                     push(@implContent, "    return " . NativeToJSValue($attribute->signature, 0, $interfaceName, "nativeResult", "castedThis") . ";\n");
     1969                    push(@implContent, "    return result;\n");
    19801970                }
    19811971
     
    32083198}
    32093199
    3210 sub NativeValueToLocal
    3211 {
    3212     my $value = shift;
    3213     my $type = shift;
    3214 
    3215     return "WTF::getPtr($value)" if $type =~ /\*$/;
    3216     return $value;
    3217 }
    3218 
    32193200sub JSValueToNative
    32203201{
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r147464 r147480  
    658658    ExceptionCode ec = 0;
    659659    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    660     int nativeResult = impl->attrWithGetterException(ec);
     660    JSC::JSValue result = jsNumber(impl->attrWithGetterException(ec));
    661661    setDOMException(exec, ec);
    662     return jsNumber(nativeResult);
     662    return result;
    663663}
    664664
     
    679679    ExceptionCode ec = 0;
    680680    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    681     const String& nativeResult = impl->stringAttrWithGetterException(ec);
     681    JSC::JSValue result = jsStringWithCache(exec, impl->stringAttrWithGetterException(ec));
    682682    setDOMException(exec, ec);
    683     return jsStringWithCache(exec, nativeResult);
     683    return result;
    684684}
    685685
     
    728728    ExceptionCode ec = 0;
    729729    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)));
    731731    setDOMException(exec, ec);
    732     return toJS(exec, castedThis->globalObject(), WTF::getPtr(nativeResult));
     732    return result;
    733733}
    734734
     
    742742        return jsUndefined();
    743743    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)));
    745745    setDOMException(exec, ec);
    746     return toJS(exec, castedThis->globalObject(), WTF::getPtr(nativeResult));
     746    return result;
    747747}
    748748
     
    768768        return jsUndefined();
    769769    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)));
    771771    setDOMException(exec, ec);
    772     return toJS(exec, castedThis->globalObject(), WTF::getPtr(nativeResult));
     772    return result;
    773773}
    774774
     
    988988    bool isNull = false;
    989989    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    990     double nativeResult = impl->nullableDoubleAttribute(isNull);
     990    JSValue result = jsNumber(impl->nullableDoubleAttribute(isNull));
    991991    if (isNull)
    992992        return jsNull();
    993     return jsNumber(nativeResult);
     993    return result;
    994994}
    995995
     
    10011001    bool isNull = false;
    10021002    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    1003     int nativeResult = impl->nullableLongAttribute(isNull);
     1003    JSValue result = jsNumber(impl->nullableLongAttribute(isNull));
    10041004    if (isNull)
    10051005        return jsNull();
    1006     return jsNumber(nativeResult);
     1006    return result;
    10071007}
    10081008
     
    10141014    bool isNull = false;
    10151015    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    1016     bool nativeResult = impl->nullableBooleanAttribute(isNull);
     1016    JSValue result = jsBoolean(impl->nullableBooleanAttribute(isNull));
    10171017    if (isNull)
    10181018        return jsNull();
    1019     return jsBoolean(nativeResult);
     1019    return result;
    10201020}
    10211021
     
    10271027    bool isNull = false;
    10281028    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    1029     const String& nativeResult = impl->nullableStringAttribute(isNull);
     1029    JSValue result = jsStringWithCache(exec, impl->nullableStringAttribute(isNull));
    10301030    if (isNull)
    10311031        return jsNull();
    1032     return jsStringWithCache(exec, nativeResult);
     1032    return result;
    10331033}
    10341034
     
    10401040    bool isNull = false;
    10411041    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    1042     int nativeResult = impl->nullableLongSettableAttribute(isNull);
     1042    JSValue result = jsNumber(impl->nullableLongSettableAttribute(isNull));
    10431043    if (isNull)
    10441044        return jsNull();
    1045     return jsNumber(nativeResult);
     1045    return result;
    10461046}
    10471047
     
    10531053    bool isNull = false;
    10541054    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    1055     int nativeResult = impl->nullableStringValue(isNull, ec);
     1055    JSC::JSValue result = jsNumber(impl->nullableStringValue(isNull, ec));
    10561056    if (isNull)
    10571057        return jsNull();
    10581058    setDOMException(exec, ec);
    1059     return jsNumber(nativeResult);
     1059    return result;
    10601060}
    10611061
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r147464 r147480  
    226226    ExceptionCode ec = 0;
    227227    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
    228     int nativeResult = impl->attrWithGetterException(ec);
     228    JSC::JSValue result = jsNumber(impl->attrWithGetterException(ec));
    229229    setDOMException(exec, ec);
    230     return jsNumber(nativeResult);
     230    return result;
    231231}
    232232
     
    247247    ExceptionCode ec = 0;
    248248    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
    249     const String& nativeResult = impl->stringAttrWithGetterException(ec);
     249    JSC::JSValue result = jsStringWithCache(exec, impl->stringAttrWithGetterException(ec));
    250250    setDOMException(exec, ec);
    251     return jsStringWithCache(exec, nativeResult);
     251    return result;
    252252}
    253253
Note: See TracChangeset for help on using the changeset viewer.