Cherry pick http://src.chromium.org/viewvc/chrome?view=rev&revision=43874

Fix bug: 2588887

Change-Id: I06d64e58a95d9dd8d7e4308e1601c55d6d33663f
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 @@
 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) {