aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectproto.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-08-01 22:42:57 +0200
committerLars Knoll <lars.knoll@qt.io>2018-08-02 20:25:31 +0000
commitf4c8e2f5f03ac08627c68f1cfb832084c73b67d5 (patch)
treec0ef8d0aca3196f6b8a97e9d9d152b3c069b4962 /src/qml/jsruntime/qv4objectproto.cpp
parent2291588304b6c057ad8fe0551aa76f33a4055917 (diff)
Fix some spec incompatibilities in Object.prototype
Change-Id: I5f0533a443404276ebc79fc8a1fbb33bda38556f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 47f101e4e4..45d9a1219d 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -396,9 +396,9 @@ ReturnedValue ObjectPrototype::method_preventExtensions(const FunctionObject *b,
{
Scope scope(b);
if (!argc)
- return scope.engine->throwTypeError();
+ return Encode::undefined();
- ScopedObject o(scope, argv[0].toObject(scope.engine));
+ ScopedObject o(scope, argv[0]);
if (!o)
return argv[0].asReturnedValue();
@@ -410,9 +410,9 @@ ReturnedValue ObjectPrototype::method_isSealed(const FunctionObject *b, const Va
{
Scope scope(b);
if (!argc)
- return scope.engine->throwTypeError();
+ return Encode(true);
- ScopedObject o(scope, argv[0].toObject(scope.engine));
+ ScopedObject o(scope, argv[0]);
if (!o)
return Encode(true);
@@ -442,9 +442,9 @@ ReturnedValue ObjectPrototype::method_isFrozen(const FunctionObject *b, const Va
{
Scope scope(b);
if (!argc)
- return scope.engine->throwTypeError();
+ return Encode(true);
- ScopedObject o(scope, argv[0].toObject(scope.engine));
+ ScopedObject o(scope, argv[0]);
if (!o)
return Encode(true);
@@ -474,9 +474,9 @@ ReturnedValue ObjectPrototype::method_isExtensible(const FunctionObject *b, cons
{
Scope scope(b);
if (!argc)
- return scope.engine->throwTypeError();
+ return Encode(false);
- ScopedObject o(scope, argv[0].toObject(scope.engine));
+ ScopedObject o(scope, argv[0]);
if (!o)
return Encode(false);