1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtScript module of the Qt Toolkit. |
7 ** This file is part of the QtScript module of the Qt Toolkit. |
8 ** |
8 ** |
59 if (!d || !d->delegate) |
59 if (!d || !d->delegate) |
60 return JSC::JSObject::getOwnPropertySlot(exec, propertyName, slot); |
60 return JSC::JSObject::getOwnPropertySlot(exec, propertyName, slot); |
61 return d->delegate->getOwnPropertySlot(this, exec, propertyName, slot); |
61 return d->delegate->getOwnPropertySlot(this, exec, propertyName, slot); |
62 } |
62 } |
63 |
63 |
|
64 bool QScriptObject::getOwnPropertyDescriptor(JSC::ExecState* exec, |
|
65 const JSC::Identifier& propertyName, |
|
66 JSC::PropertyDescriptor& descriptor) |
|
67 { |
|
68 if (!d || !d->delegate) |
|
69 return JSC::JSObject::getOwnPropertyDescriptor(exec, propertyName, descriptor); |
|
70 return d->delegate->getOwnPropertyDescriptor(this, exec, propertyName, descriptor); |
|
71 } |
|
72 |
64 void QScriptObject::put(JSC::ExecState* exec, const JSC::Identifier& propertyName, |
73 void QScriptObject::put(JSC::ExecState* exec, const JSC::Identifier& propertyName, |
65 JSC::JSValue value, JSC::PutPropertySlot& slot) |
74 JSC::JSValue value, JSC::PutPropertySlot& slot) |
66 { |
75 { |
67 if (!d || !d->delegate) { |
76 if (!d || !d->delegate) { |
68 JSC::JSObject::put(exec, propertyName, value, slot); |
77 JSC::JSObject::put(exec, propertyName, value, slot); |
161 const JSC::Identifier& propertyName, |
170 const JSC::Identifier& propertyName, |
162 JSC::PropertySlot& slot) |
171 JSC::PropertySlot& slot) |
163 { |
172 { |
164 return object->JSC::JSObject::getOwnPropertySlot(exec, propertyName, slot); |
173 return object->JSC::JSObject::getOwnPropertySlot(exec, propertyName, slot); |
165 } |
174 } |
|
175 |
|
176 bool QScriptObjectDelegate::getOwnPropertyDescriptor(QScriptObject* object, JSC::ExecState* exec, |
|
177 const JSC::Identifier& propertyName, |
|
178 JSC::PropertyDescriptor& descriptor) |
|
179 { |
|
180 return object->JSC::JSObject::getOwnPropertyDescriptor(exec, propertyName, descriptor); |
|
181 } |
|
182 |
166 |
183 |
167 void QScriptObjectDelegate::put(QScriptObject* object, JSC::ExecState* exec, |
184 void QScriptObjectDelegate::put(QScriptObject* object, JSC::ExecState* exec, |
168 const JSC::Identifier& propertyName, |
185 const JSC::Identifier& propertyName, |
169 JSC::JSValue value, JSC::PutPropertySlot& slot) |
186 JSC::JSValue value, JSC::PutPropertySlot& slot) |
170 { |
187 { |