diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-03-20 17:55:08 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-03-21 11:01:08 +0100 |
commit | 3b25582c153cd3704aa396876829de1341a48c3c (patch) | |
tree | 0a57346262defd245e0d0dbd793d6c1774640b5a /src | |
parent | 4737f7a5d889bde87e52b2f50ed7693d9b410aa7 (diff) |
v8 api: Correctly set up the prototype property for constructors
Also remove some debug output for methods that are actually working
as intended.
Change-Id: Id5df0c87eda40f8ae9769cc43fa05a9ecf67c31c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/v4/qv4v8.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/v4/qv4v8.cpp b/src/v4/qv4v8.cpp index 6040c9fa9f..0c30df4e49 100644 --- a/src/v4/qv4v8.cpp +++ b/src/v4/qv4v8.cpp @@ -1664,7 +1664,7 @@ Local<Function> FunctionTemplate::GetFunction() VM::ExecutionEngine *engine = currentEngine(); VM::Object *o = new (engine->memoryManager) V4V8Function(engine, this); VM::Object *proto = new (engine->memoryManager) V4V8Object<VM::FunctionPrototype>(engine, m_prototypeTemplate.get()); - o->prototype = proto; + o->put(engine->current, engine->id_prototype, VM::Value::fromObject(proto)); return Local<Function>::New(Value::fromVmValue(VM::Value::fromObject(o))); } @@ -1759,13 +1759,14 @@ void ObjectTemplate::SetInternalFieldCount(int value) bool ObjectTemplate::HasExternalResource() { - Q_UNIMPLEMENTED(); - Q_UNREACHABLE(); + // we always reserve the space for the external resource + return true; } void ObjectTemplate::SetHasExternalResource(bool value) { - Q_UNIMPLEMENTED(); + // no need for this, we always reserve the space for the external resource + Q_UNUSED(value); } void ObjectTemplate::MarkAsUseUserObjectComparison() |