diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-02-14 08:21:39 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-02-14 08:21:39 +0100 |
commit | 802bebd566574153e7bf96470199732bf36c36da (patch) | |
tree | df749b7bdcea1ef37fa6c4cd7ca502b94d839415 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | 24d4e164ad4ef0bf8e5a4a0f2c28e3b9df48d352 (diff) | |
parent | 32f6315d6d458600bb3f1db08c53148557382c21 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I372850330c1d92edc5b07596759f0db3a59082a8
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 99fe262cb4..44582817d5 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -337,6 +337,7 @@ private slots: void constkw_data(); void constkw(); void redefineGlobalProp(); + void freeze_empty_object(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -8289,6 +8290,18 @@ void tst_qqmlecmascript::redefineGlobalProp() } } +void tst_qqmlecmascript::freeze_empty_object() +{ + // this shouldn't crash + QJSEngine engine; + QJSValue v = engine.evaluate(QString::fromLatin1( + "var obj = {};\n" + "Object.freeze(obj);\n" + )); + QVERIFY(!v.isError()); + QCOMPARE(v.toBool(), true); +} + QTEST_MAIN(tst_qqmlecmascript) |