[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
mrobinson at webkit.org
mrobinson at webkit.org
Fri Jan 21 14:46:30 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 43e80e2f18c502223a15e45f6200b28ca69bfd2a
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 29 22:20:51 2010 +0000
2010-12-29 Martin Robinson <mrobinson at igalia.com>
Reviewed by Sam Weinig.
JSDataViewCustom.cpp gives the fastcall calling convention to functions called via C++
https://bugs.webkit.org/show_bug.cgi?id=51722
Remove the JSC_HOST_CALL from methods that are called from C++. JSC_HOST_CALL gives
methods the fastcall calling convention, which leads to runtime errors when they are
called from C++. Also remove a bit of unnecessary code duplication.
No new tests. This is covered by fast/canvas/webgl/data-view-test.html.
* bindings/js/JSDataViewCustom.cpp:
(WebCore::getDataViewMember): Remove duplicated code.
(WebCore::JSDataView::getInt8): Remove JSC_HOST_CALL.
(WebCore::JSDataView::getUint8): Ditto.
(WebCore::JSDataView::getFloat32): Ditto.
(WebCore::JSDataView::getFloat64): Ditto.
(WebCore::setDataViewMember): Remove duplicated code.
(WebCore::JSDataView::setInt8): Remove JSC_HOST_CALL.
(WebCore::JSDataView::setUint8): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cbd489a..4990394 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-12-29 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Sam Weinig.
+
+ JSDataViewCustom.cpp gives the fastcall calling convention to functions called via C++
+ https://bugs.webkit.org/show_bug.cgi?id=51722
+
+ Remove the JSC_HOST_CALL from methods that are called from C++. JSC_HOST_CALL gives
+ methods the fastcall calling convention, which leads to runtime errors when they are
+ called from C++. Also remove a bit of unnecessary code duplication.
+
+ No new tests. This is covered by fast/canvas/webgl/data-view-test.html.
+
+ * bindings/js/JSDataViewCustom.cpp:
+ (WebCore::getDataViewMember): Remove duplicated code.
+ (WebCore::JSDataView::getInt8): Remove JSC_HOST_CALL.
+ (WebCore::JSDataView::getUint8): Ditto.
+ (WebCore::JSDataView::getFloat32): Ditto.
+ (WebCore::JSDataView::getFloat64): Ditto.
+ (WebCore::setDataViewMember): Remove duplicated code.
+ (WebCore::JSDataView::setInt8): Remove JSC_HOST_CALL.
+ (WebCore::JSDataView::setUint8): Ditto.
+
2010-12-29 Dan Bernstein <mitz at apple.com>
Reviewed by Kenneth Russel.
diff --git a/WebCore/bindings/js/JSDataViewCustom.cpp b/WebCore/bindings/js/JSDataViewCustom.cpp
index f17e0e1..b7d4b8f 100644
--- a/WebCore/bindings/js/JSDataViewCustom.cpp
+++ b/WebCore/bindings/js/JSDataViewCustom.cpp
@@ -65,13 +65,8 @@ EncodedJSValue JSC_HOST_CALL JSDataViewConstructor::constructJSDataView(ExecStat
return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), view.get())));
}
-static JSValue getDataViewMember(ExecState* exec, DataViewAccessType type)
+static JSValue getDataViewMember(ExecState* exec, DataView* imp, DataViewAccessType type)
{
- JSValue thisValue = exec->hostThisValue();
- if (!thisValue.inherits(&JSDataView::s_info))
- return throwTypeError(exec);
- JSDataView* castedThis = static_cast<JSDataView*>(asObject(thisValue));
- DataView* imp = static_cast<DataView*>(castedThis->impl());
if (exec->argumentCount() < 1)
return throwError(exec, createSyntaxError(exec, "Not enough arguments"));
ExceptionCode ec = 0;
@@ -107,33 +102,28 @@ static JSValue getDataViewMember(ExecState* exec, DataViewAccessType type)
return result;
}
-JSValue JSC_HOST_CALL JSDataView::getInt8(ExecState* exec)
+JSValue JSDataView::getInt8(ExecState* exec)
{
- return getDataViewMember(exec, AccessDataViewMemberAsInt8);
+ return getDataViewMember(exec, static_cast<DataView*>(impl()), AccessDataViewMemberAsInt8);
}
-JSValue JSC_HOST_CALL JSDataView::getUint8(ExecState* exec)
+JSValue JSDataView::getUint8(ExecState* exec)
{
- return getDataViewMember(exec, AccessDataViewMemberAsUint8);
+ return getDataViewMember(exec, static_cast<DataView*>(impl()), AccessDataViewMemberAsUint8);
}
-JSValue JSC_HOST_CALL JSDataView::getFloat32(ExecState* exec)
+JSValue JSDataView::getFloat32(ExecState* exec)
{
- return getDataViewMember(exec, AccessDataViewMemberAsFloat32);
+ return getDataViewMember(exec, static_cast<DataView*>(impl()), AccessDataViewMemberAsFloat32);
}
-JSValue JSC_HOST_CALL JSDataView::getFloat64(ExecState* exec)
+JSValue JSDataView::getFloat64(ExecState* exec)
{
- return getDataViewMember(exec, AccessDataViewMemberAsFloat64);
+ return getDataViewMember(exec, static_cast<DataView*>(impl()), AccessDataViewMemberAsFloat64);
}
-static JSValue setDataViewMember(ExecState* exec, DataViewAccessType type)
+static JSValue setDataViewMember(ExecState* exec, DataView* imp, DataViewAccessType type)
{
- JSValue thisValue = exec->hostThisValue();
- if (!thisValue.inherits(&JSDataView::s_info))
- return throwTypeError(exec);
- JSDataView* castedThis = static_cast<JSDataView*>(asObject(thisValue));
- DataView* imp = static_cast<DataView*>(castedThis->impl());
if (exec->argumentCount() < 2)
return throwError(exec, createSyntaxError(exec, "Not enough arguments"));
ExceptionCode ec = 0;
@@ -159,14 +149,14 @@ static JSValue setDataViewMember(ExecState* exec, DataViewAccessType type)
return jsUndefined();
}
-JSValue JSC_HOST_CALL JSDataView::setInt8(ExecState* exec)
+JSValue JSDataView::setInt8(ExecState* exec)
{
- return setDataViewMember(exec, AccessDataViewMemberAsInt8);
+ return setDataViewMember(exec, static_cast<DataView*>(impl()), AccessDataViewMemberAsInt8);
}
-JSValue JSC_HOST_CALL JSDataView::setUint8(ExecState* exec)
+JSValue JSDataView::setUint8(ExecState* exec)
{
- return setDataViewMember(exec, AccessDataViewMemberAsUint8);
+ return setDataViewMember(exec, static_cast<DataView*>(impl()), AccessDataViewMemberAsUint8);
}
} // namespace WebCore
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list