summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-13 18:14:52 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-08-25 03:45:29 +0000
commitbad007360a0f6fba304d8f4c99826a1250fd886c (patch)
tree71fb72d408de43c75c2ee7d968860b9a1c95ac54
parentce5c468f36286e251d3dfee3496faf240dc0e92d (diff)
downloadqtdeclarative-bad007360a0f6fba304d8f4c99826a1250fd886c.tar.gz
qtdeclarative-bad007360a0f6fba304d8f4c99826a1250fd886c.tar.bz2
qtdeclarative-bad007360a0f6fba304d8f4c99826a1250fd886c.zip
Remove this piece of code
This was required with the old v8 engine, but removing the lines doesn't seem to cause any regressions in our tests, so let's get rid of them, and have proper JS scoping rules in place. Change-Id: Ib22b4e820bceff9fe26291dae1bf7b55b12a5cde Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index 100702941..99a5fe56c 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -100,23 +100,14 @@ ReturnedValue QmlContextWrapper::get(const Managed *m, String *name, bool *hasPr
QV4::ExecutionEngine *v4 = resource->engine();
QV4::Scope scope(v4);
- // In V8 the JS global object would come _before_ the QML global object,
- // so simulate that here.
- bool hasProp;
- QV4::ScopedValue result(scope, v4->globalObject->get(name, &hasProp));
- if (hasProp) {
- if (hasProperty)
- *hasProperty = hasProp;
- return result->asReturnedValue();
- }
-
if (resource->d()->isNullWrapper)
return Object::get(m, name, hasProperty);
if (v4->callingQmlContext() != resource->d()->context)
return Object::get(m, name, hasProperty);
- result = Object::get(m, name, &hasProp);
+ bool hasProp;
+ QV4::ScopedValue result(scope, Object::get(m, name, &hasProp));
if (hasProp) {
if (hasProperty)
*hasProperty = hasProp;