diff options
-rwxr-xr-x | WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp b/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp index 58f810b..1959454 100755 --- a/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp +++ b/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp @@ -43,6 +43,10 @@ namespace WebCore { v8::Handle<v8::Value> V8WebKitPoint::constructorCallback(const v8::Arguments& args) { INC_STATS("DOM.WebKitPoint.Constructor"); + + if (!args.IsConstructCall()) + return throwError("DOM object constructor cannot be called as a function."); + float x = 0; float y = 0; if (args.Length() > 1) { |