diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2017-04-03 20:43:59 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-04-04 11:24:48 +0000 |
commit | 95a78c9f04d9a3f954477855f84180ced556a480 (patch) | |
tree | c2ec9e8200aa71912f128cf66037d893ad922f03 /Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp | |
parent | 8f0971a1425e5d322af576581e225e4d0e6e5313 (diff) | |
download | qtwebkit-5.6.3.tar.gz |
[QML] evaluateJavaScript should preserve null values in result5.6.3
We should not convert null to undefined when returning JS values from JSC
to QJSEngine.
Change-Id: I20f5638fe9104341e1a0878fdbdbc49e5fa8d2e1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit 689348d71bd31adc669a67f9f840d31b63fff333)
Diffstat (limited to 'Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp index bc2d5d21c..5300a40ff 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp @@ -131,6 +131,11 @@ static QJSValue buildQJSValue(QJSEngine* engine, JSGlobalContextRef context, JSV return var; switch (JSValueGetType(context, value)) { + case kJSTypeUndefined: + break; + case kJSTypeNull: + var = QJSValue(QJSValue::NullValue); + break; case kJSTypeBoolean: var = QJSValue(JSValueToBoolean(context, value)); break; |