commit | 2c5b09caa6caba78a6d943c1ae480ca542a1157a | [log] [tgz] |
---|---|---|
author | Andrei Popescu <andreip@google.com> | Mon Apr 12 17:03:04 2010 +0100 |
committer | Andrei Popescu <andreip@google.com> | Mon Apr 12 17:03:04 2010 +0100 |
tree | 7acc0f93b6cdfd5f54910350daf8f4a0f66a1e48 | |
parent | 411a8ae3907d3288c7e8ed008d61303f08fe265a [diff] |
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) {