src/script/bridge/qscriptobject.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
    79     }
    79     }
    80     d->delegate->put(this, exec, propertyName, value, slot);
    80     d->delegate->put(this, exec, propertyName, value, slot);
    81 }
    81 }
    82 
    82 
    83 bool QScriptObject::deleteProperty(JSC::ExecState* exec,
    83 bool QScriptObject::deleteProperty(JSC::ExecState* exec,
    84                                    const JSC::Identifier& propertyName,
    84                                    const JSC::Identifier& propertyName)
    85                                    bool checkDontDelete)
    85 {
    86 {
    86     if (!d || !d->delegate)
    87     if (!d || !d->delegate)
    87         return JSC::JSObject::deleteProperty(exec, propertyName);
    88         return JSC::JSObject::deleteProperty(exec, propertyName, checkDontDelete);
    88     return d->delegate->deleteProperty(this, exec, propertyName);
    89     return d->delegate->deleteProperty(this, exec, propertyName, checkDontDelete);
       
    90 }
       
    91 
       
    92 bool QScriptObject::getPropertyAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName,
       
    93                                           unsigned& attributes) const
       
    94 {
       
    95     if (!d || !d->delegate)
       
    96         return JSC::JSObject::getPropertyAttributes(exec, propertyName, attributes);
       
    97     return d->delegate->getPropertyAttributes(this, exec, propertyName, attributes);
       
    98 }
    89 }
    99 
    90 
   100 void QScriptObject::getOwnPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames,
    91 void QScriptObject::getOwnPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames,
   101                                         bool includeNonEnumerable)
    92                                         JSC::EnumerationMode mode)
   102 {
    93 {
   103     if (!d || !d->delegate) {
    94     if (!d || !d->delegate) {
   104         JSC::JSObject::getOwnPropertyNames(exec, propertyNames, includeNonEnumerable);
    95         JSC::JSObject::getOwnPropertyNames(exec, propertyNames, mode);
   105         return;
    96         return;
   106     }
    97     }
   107     d->delegate->getOwnPropertyNames(this, exec, propertyNames, includeNonEnumerable);
    98     d->delegate->getOwnPropertyNames(this, exec, propertyNames, mode);
   108 }
    99 }
   109 
   100 
   110 bool QScriptObject::compareToObject(JSC::ExecState* exec, JSC::JSObject *other)
   101 bool QScriptObject::compareToObject(JSC::ExecState* exec, JSC::JSObject *other)
   111 {
   102 {
   112     if (!d || !d->delegate) {
   103     if (!d || !d->delegate) {
   187 {
   178 {
   188     object->JSC::JSObject::put(exec, propertyName, value, slot);
   179     object->JSC::JSObject::put(exec, propertyName, value, slot);
   189 }
   180 }
   190 
   181 
   191 bool QScriptObjectDelegate::deleteProperty(QScriptObject* object, JSC::ExecState* exec,
   182 bool QScriptObjectDelegate::deleteProperty(QScriptObject* object, JSC::ExecState* exec,
   192                                            const JSC::Identifier& propertyName,
   183                                            const JSC::Identifier& propertyName)
   193                                            bool checkDontDelete)
   184 {
   194 {
   185     return object->JSC::JSObject::deleteProperty(exec, propertyName);
   195     return object->JSC::JSObject::deleteProperty(exec, propertyName, checkDontDelete);
       
   196 }
       
   197 
       
   198 bool QScriptObjectDelegate::getPropertyAttributes(const QScriptObject* object,
       
   199                                                   JSC::ExecState* exec,
       
   200                                                   const JSC::Identifier& propertyName,
       
   201                                                   unsigned& attributes) const
       
   202 {
       
   203     return object->JSC::JSObject::getPropertyAttributes(exec, propertyName, attributes);
       
   204 }
   186 }
   205 
   187 
   206 void QScriptObjectDelegate::getOwnPropertyNames(QScriptObject* object, JSC::ExecState* exec,
   188 void QScriptObjectDelegate::getOwnPropertyNames(QScriptObject* object, JSC::ExecState* exec,
   207                                                 JSC::PropertyNameArray& propertyNames,
   189                                                 JSC::PropertyNameArray& propertyNames,
   208                                                 bool includeNonEnumerable)
   190                                                 JSC::EnumerationMode mode)
   209 {
   191 {
   210     object->JSC::JSObject::getOwnPropertyNames(exec, propertyNames, includeNonEnumerable);
   192     object->JSC::JSObject::getOwnPropertyNames(exec, propertyNames, mode);
   211 }
   193 }
   212 
   194 
   213 void QScriptObjectDelegate::markChildren(QScriptObject* object, JSC::MarkStack& markStack)
   195 void QScriptObjectDelegate::markChildren(QScriptObject* object, JSC::MarkStack& markStack)
   214 {
   196 {
   215     // ### should this call the virtual function instead??
   197     // ### should this call the virtual function instead??