summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2010-04-12 17:03:04 +0100
committerAndrei Popescu <andreip@google.com>2010-04-12 17:03:04 +0100
commit2c5b09caa6caba78a6d943c1ae480ca542a1157a (patch)
tree7acc0f93b6cdfd5f54910350daf8f4a0f66a1e48 /WebCore/bindings/v8
parent411a8ae3907d3288c7e8ed008d61303f08fe265a (diff)
downloadexternal_webkit-2c5b09caa6caba78a6d943c1ae480ca542a1157a.zip
external_webkit-2c5b09caa6caba78a6d943c1ae480ca542a1157a.tar.gz
external_webkit-2c5b09caa6caba78a6d943c1ae480ca542a1157a.tar.bz2
Cherry pick http://src.chromium.org/viewvc/chrome?view=rev&revision=43874
Fix bug: 2588887 Change-Id: I06d64e58a95d9dd8d7e4308e1601c55d6d33663f
Diffstat (limited to 'WebCore/bindings/v8')
-rwxr-xr-xWebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp4
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) {