Esempio n. 1
0
 void ScriptObject::setUintProperty(uint32_t i, Atom value)
 {
     AvmCore* core = this->core();
     if (!(i&MAX_INTEGER_MASK))
     {
         Atom name = core->uintToAtom (i);
         if (traits()->needsHashtable())
         {
             MMGC_MEM_TYPE(this);
             getTable()->add(name, value);
             MMGC_MEM_TYPE(NULL);
         }
         else
         {
             throwWriteSealedError(core->internUint32(i)->atom());
         }
     }
     else
     {
         setAtomProperty(core->internUint32(i)->atom(), value);
     }
 }
Esempio n. 2
0
 bool ScriptObject::hasUintProperty(uint32_t i) const
 {
     AvmCore* core = this->core();
     if (!(i&MAX_INTEGER_MASK))
     {
         Atom name = core->uintToAtom (i);
         if (traits()->needsHashtable())
         {
             return getTable()->contains(name);
         }
         else
         {
             // ISSUE should this walk the proto chain?
             return false;
         }
     }
     else
     {
         return hasAtomProperty(core->internUint32(i)->atom());
     }
 }
Esempio n. 3
0
 bool ScriptObject::delUintProperty(uint32_t i)
 {
     AvmCore* core = this->core();
     if (!(i&MAX_INTEGER_MASK))
     {
         Atom name = core->uintToAtom (i);
         if (traits()->needsHashtable())
         {
             getTable()->remove(name);
             return true;
         }
         else
         {
             return false;
         }
     }
     else
     {
         return deleteAtomProperty(core->internUint32(i)->atom());
     }
 }