From bad007360a0f6fba304d8f4c99826a1250fd886c Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 13 Aug 2015 18:14:52 +0200 Subject: 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 --- src/qml/qml/qqmlcontextwrapper.cpp | 13 ++----------- 1 file 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; -- cgit v1.2.3