summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp')
-rw-r--r--WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp b/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp
index b07d288..4819064 100644
--- a/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp
@@ -47,7 +47,11 @@ namespace WebCore {
CALLBACK_FUNC_DECL(WebKitCSSMatrixConstructor)
{
INC_STATS("DOM.WebKitCSSMatrix.Constructor");
- // FIXME: The logic here is almost exact duplicate of V8::ConstructDOMObject.
+
+ if (!args.IsConstructCall())
+ return throwError("DOM object constructor cannot be called as a function.");
+
+ // FIXME: The logic here is almost exact duplicate of V8::constructDOMObject.
// Consider refactoring to reduce duplication.
String cssValue;
if (args.Length() >= 1)
@@ -59,7 +63,7 @@ CALLBACK_FUNC_DECL(WebKitCSSMatrixConstructor)
throwError(ec);
// Transform the holder into a wrapper object for the matrix.
- V8Proxy::SetDOMWrapper(args.Holder(), V8ClassIndex::ToInt(V8ClassIndex::WEBKITCSSMATRIX), matrix.get());
+ V8DOMWrapper::setDOMWrapper(args.Holder(), V8ClassIndex::ToInt(V8ClassIndex::WEBKITCSSMATRIX), matrix.get());
return toV8(matrix.release(), args.Holder());
}