return engine()->throwReferenceError(n);
}
-ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Object *&base)
+ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Heap::Object **base)
{
Scope scope(this);
ScopedValue v(scope);
- base = (Object *)0;
+ *base = (Heap::Object *)0;
name->makeIdentifier();
if (name->equals(d()->engine->id_this))
bool hasProperty = false;
v = w->get(name, &hasProperty);
if (hasProperty) {
- base = w;
+ *base = w->d();
return v.asReturnedValue();
}
continue;
v = activation->get(name, &hasProperty);
if (hasProperty) {
if (ctx->d()->type == Heap::ExecutionContext::Type_QmlContext)
- base = activation;
+ *base = activation->d();
return v.asReturnedValue();
}
}
void setProperty(String *name, const ValueRef value);
ReturnedValue getProperty(String *name);
- ReturnedValue getPropertyAndBase(String *name, Object *&base);
+ ReturnedValue getPropertyAndBase(String *name, Heap::Object **base);
bool deleteProperty(String *name);
inline CallContext *asCallContext();
ScopedString name(scope, engine->currentContext()->compilationUnit->runtimeStrings[nameIndex]);
ScopedObject base(scope);
- Object *baseObj = 0;
ScopedContext ctx(scope, engine->currentContext());
- ScopedValue func(scope, ctx->getPropertyAndBase(name, baseObj));
- base.ptr->m = baseObj ? &baseObj->data : 0;
+ ScopedValue func(scope, ctx->getPropertyAndBase(name, base.getRef()));
if (scope.engine->hasException)
return Encode::undefined();