diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-03-19 12:29:32 +0100 |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2012-03-19 12:37:03 +0100 |
commit | 4821058f10118be55a541ad39e25ec9165cca3b3 (patch) | |
tree | 167973e3c68fc442b0e37d6f628f3fdbe759f15a /src/qml/qml/v8/qv8contextwrapper.cpp | |
parent | 83f11e33745180e9370d484cbcedd0bac020c9dd (diff) | |
parent | 26d5f2e833f0e3686aaa27e695bbfab5fbd808ad (diff) |
Merge master into api_changes
Conflicts:
src/qml/debugger/qqmlenginedebugservice.cpp
src/qml/qml/v8/qv8qobjectwrapper.cpp
src/quick/util/qquickimageprovider.cpp
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
Change-Id: Ie78ba2fabd32f4812bcae9dbdd66ed289dc11dcb
Diffstat (limited to 'src/qml/qml/v8/qv8contextwrapper.cpp')
-rw-r--r-- | src/qml/qml/v8/qv8contextwrapper.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/qml/qml/v8/qv8contextwrapper.cpp b/src/qml/qml/v8/qv8contextwrapper.cpp index 246b716aa0..39392b8984 100644 --- a/src/qml/qml/v8/qv8contextwrapper.cpp +++ b/src/qml/qml/v8/qv8contextwrapper.cpp @@ -238,16 +238,11 @@ QQmlContextData *QV8ContextWrapper::context(v8::Handle<v8::Value> value) return r?r->getContext():0; } -v8::Handle<v8::Value> QV8ContextWrapper::NullGetter(v8::Local<v8::String> property, - const v8::AccessorInfo &info) +v8::Handle<v8::Value> QV8ContextWrapper::NullGetter(v8::Local<v8::String>, + const v8::AccessorInfo &) { - QV8ContextResource *resource = v8_resource_check<QV8ContextResource>(info.This()); - - QV8Engine *engine = resource->engine; - - QString error = QLatin1String("Can't find variable: ") + engine->toString(property); - v8::ThrowException(v8::Exception::ReferenceError(engine->toString(error))); - return v8::Undefined(); + // V8 will throw a ReferenceError if appropriate ("typeof" should not throw) + return v8::Handle<v8::Value>(); } v8::Handle<v8::Value> QV8ContextWrapper::Getter(v8::Local<v8::String> property, @@ -365,9 +360,8 @@ v8::Handle<v8::Value> QV8ContextWrapper::Getter(v8::Local<v8::String> property, expressionContext->unresolvedNames = true; - QString error = QLatin1String("Can't find variable: ") + engine->toString(property); - v8::ThrowException(v8::Exception::ReferenceError(engine->toString(error))); - return v8::Undefined(); + // V8 will throw a ReferenceError if appropriate ("typeof" should not throw) + return v8::Handle<v8::Value>(); } v8::Handle<v8::Value> QV8ContextWrapper::NullSetter(v8::Local<v8::String> property, |