Bug 751377 - Add resolve-flags arguments to all the element-access APIs that might call a resolve hook, since resolve flags appear like they'll be with us for at least the near future. :-\ r=bhackett
authorJeff Walden <jwalden@mit.edu>
Tue, 29 May 2012 12:01:32 -0700
changeset 106406 89cb0e3b4693923bacd4e2643dc4195835435703
parent 106405 24e8950269e3bc088a0c7aee017b0d0561e3d874
child 106407 8e98046e2c7dfcb37fb5fe7b38c7d2b4d2b52662
push id23447
push userdanderson@mozilla.com
push dateTue, 11 Sep 2012 17:34:27 +0000
treeherdermozilla-central@fdfaef738a00 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs751377
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 751377 - Add resolve-flags arguments to all the element-access APIs that might call a resolve hook, since resolve flags appear like they'll be with us for at least the near future. :-\ r=bhackett
content/base/src/nsINode.cpp
js/src/vm/ObjectImpl.cpp
js/src/vm/ObjectImpl.h
--- a/js/src/vm/ObjectImpl.cpp
+++ b/js/src/vm/ObjectImpl.cpp
@@ -286,17 +286,18 @@ js::ObjectImpl::markChildren(JSTracer *t
     if (clasp->trace)
         clasp->trace(trc, obj);
 
     if (shape_->isNative())
         MarkObjectSlots(trc, obj, 0, obj->slotSpan());
 }
 
 bool
-DenseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc)
+DenseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index,
+                                   unsigned resolveFlags, PropDesc *desc)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     uint32_t len = initializedLength();
     if (index >= len) {
         *desc = PropDesc::undefined();
         return true;
     }
@@ -307,17 +308,18 @@ DenseElementsHeader::getOwnElement(JSCon
         return true;
     }
 
     *desc = PropDesc(slot, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable);
     return true;
 }
 
 bool
-SparseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc)
+SparseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index,
+                                    unsigned resolveFlags, PropDesc *desc)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
     return false;
 }
 
 template<typename T>
@@ -332,53 +334,55 @@ template<>
 ElementToValue(const uint8_clamped &u)
 {
     return NumberValue(uint8_t(u));
 }
 
 template<typename T>
 bool
 TypedElementsHeader<T>::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index,
-                                      PropDesc *desc)
+                                      unsigned resolveFlags, PropDesc *desc)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     if (index >= length()) {
         *desc = PropDesc::undefined();
         return true;
     }
 
     *desc = PropDesc(ElementToValue(getElement(index)), PropDesc::Writable,
                      PropDesc::Enumerable, PropDesc::Configurable);
     return false;
 }
 
 bool
 ArrayBufferElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index,
-                                         PropDesc *desc)
+                                         unsigned resolveFlags, PropDesc *desc)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
     return false;
 }
 
 bool
 SparseElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index,
-                                    const PropDesc &desc, bool shouldThrow, bool *succeeded)
+                                    const PropDesc &desc, bool shouldThrow, unsigned resolveFlags,
+                                    bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
     return false;
 }
 
 bool
 DenseElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index,
-                                   const PropDesc &desc, bool shouldThrow, bool *succeeded)
+                                   const PropDesc &desc, bool shouldThrow, unsigned resolveFlags,
+                                   bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_ASSERT_IF(desc.hasGet() || desc.hasSet(), !desc.hasValue() && !desc.hasWritable());
     MOZ_ASSERT_IF(desc.hasValue() || desc.hasWritable(), !desc.hasGet() && !desc.hasSet());
 
     /*
      * If desc is an accessor descriptor or a data descriptor with atypical
@@ -387,17 +391,17 @@ DenseElementsHeader::defineElement(JSCon
     if (desc.hasGet() || desc.hasSet() ||
         (desc.hasEnumerable() && !desc.enumerable()) ||
         (desc.hasConfigurable() && !desc.configurable()) ||
         (desc.hasWritable() && !desc.writable()))
     {
         if (!obj->makeElementsSparse(cx))
             return false;
         SparseElementsHeader &elts = obj->elementsHeader().asSparseElements();
-        return elts.defineElement(cx, obj, index, desc, shouldThrow, succeeded);
+        return elts.defineElement(cx, obj, index, desc, shouldThrow, resolveFlags, succeeded);
     }
 
     /* Does the element exist?  All behavior depends upon this. */
     uint32_t initLen = initializedLength();
     if (index < initLen) {
         HeapSlot &slot = obj->elements[index];
         if (!slot.isMagic(JS_ARRAY_HOLE)) {
             /*
@@ -430,17 +434,17 @@ DenseElementsHeader::defineElement(JSCon
     if (res == ObjectImpl::Failure)
         return false;
 
     /* Otherwise, if the index was too far out of range, go sparse. */
     if (res == ObjectImpl::ConvertToSparse) {
         if (!obj->makeElementsSparse(cx))
             return false;
         SparseElementsHeader &elts = obj->elementsHeader().asSparseElements();
-        return elts.defineElement(cx, obj, index, desc, shouldThrow, succeeded);
+        return elts.defineElement(cx, obj, index, desc, shouldThrow, resolveFlags, succeeded);
     }
 
     /* But if we were able to ensure the element's existence, we're good. */
     MOZ_ASSERT(res == ObjectImpl::Succeeded);
     obj->elements[index].set(obj->asObjectPtr(), index, desc.value());
     *succeeded = true;
     return true;
 }
@@ -455,91 +459,92 @@ ArrayBufferDelegate(JSContext *cx, Objec
     obj->setPrivate(delegate);
     return delegate;
 }
 
 template <typename T>
 bool
 TypedElementsHeader<T>::defineElement(JSContext *cx, ObjectImpl *obj,
                                       uint32_t index, const PropDesc &desc, bool shouldThrow,
-                                      bool *succeeded)
+                                      unsigned resolveFlags, bool *succeeded)
 {
     /* XXX jwalden This probably isn't how typed arrays should behave... */
     *succeeded = false;
     js_ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_OBJECT_NOT_EXTENSIBLE,
                              JSDVG_IGNORE_STACK,
                              ObjectValue(*obj),
                              NULL, NULL, NULL);
     return false;
 }
 
 bool
 ArrayBufferElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj,
                                          uint32_t index, const PropDesc &desc, bool shouldThrow,
-                                         bool *succeeded)
+                                         unsigned resolveFlags, bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     JSObject *delegate = ArrayBufferDelegate(cx, obj);
     if (!delegate)
         return false;
-    return DefineElement(cx, delegate, index, desc, shouldThrow, succeeded);
+    return DefineElement(cx, delegate, index, desc, shouldThrow, resolveFlags, succeeded);
 }
 
 bool
-js::GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc)
+js::GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, unsigned resolveFlags,
+                  PropDesc *desc)
 {
     ElementsHeader &header = obj->elementsHeader();
     switch (header.kind()) {
       case DenseElements:
-        return header.asDenseElements().getOwnElement(cx, obj, index, desc);
+        return header.asDenseElements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case SparseElements:
-        return header.asSparseElements().getOwnElement(cx, obj, index, desc);
+        return header.asSparseElements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Uint8Elements:
-        return header.asUint8Elements().getOwnElement(cx, obj, index, desc);
+        return header.asUint8Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Int8Elements:
-        return header.asInt8Elements().getOwnElement(cx, obj, index, desc);
+        return header.asInt8Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Uint16Elements:
-        return header.asUint16Elements().getOwnElement(cx, obj, index, desc);
+        return header.asUint16Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Int16Elements:
-        return header.asInt16Elements().getOwnElement(cx, obj, index, desc);
+        return header.asInt16Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Uint32Elements:
-        return header.asUint32Elements().getOwnElement(cx, obj, index, desc);
+        return header.asUint32Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Int32Elements:
-        return header.asInt32Elements().getOwnElement(cx, obj, index, desc);
+        return header.asInt32Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Uint8ClampedElements:
-        return header.asUint8ClampedElements().getOwnElement(cx, obj, index, desc);
+        return header.asUint8ClampedElements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Float32Elements:
-        return header.asFloat32Elements().getOwnElement(cx, obj, index, desc);
+        return header.asFloat32Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Float64Elements:
-        return header.asFloat64Elements().getOwnElement(cx, obj, index, desc);
+        return header.asFloat64Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case ArrayBufferElements:
-        return header.asArrayBufferElements().getOwnElement(cx, obj, index, desc);
+        return header.asArrayBufferElements().getOwnElement(cx, obj, index, resolveFlags, desc);
     }
 
     MOZ_NOT_REACHED("bad elements kind!");
     return false;
 }
 
 bool
 js::GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index,
-               Value *vp)
+               unsigned resolveFlags, Value *vp)
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
 
     do {
         MOZ_ASSERT(obj);
 
         if (static_cast<JSObject *>(obj)->isProxy()) { // XXX
             MOZ_NOT_REACHED("NYI: proxy [[GetP]]");
             return false;
         }
 
         PropDesc desc;
-        if (!GetOwnElement(cx, obj, index, &desc))
+        if (!GetOwnElement(cx, obj, index, resolveFlags, &desc))
             return false;
 
         /* No property?  Recur or bottom out. */
         if (desc.isUndefined()) {
             obj = obj->getProto();
             if (obj)
                 continue;
 
@@ -579,30 +584,30 @@ js::GetElement(JSContext *cx, ObjectImpl
         return false;
     } while (false);
 
     MOZ_NOT_REACHED("buggy control flow");
     return false;
 }
 
 bool
-js::HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, bool *found)
+js::HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, unsigned resolveFlags, bool *found)
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
 
     do {
         MOZ_ASSERT(obj);
 
         if (static_cast<JSObject *>(obj)->isProxy()) { // XXX
             MOZ_NOT_REACHED("NYI: proxy [[HasProperty]]");
             return false;
         }
 
         PropDesc prop;
-        if (!GetOwnElement(cx, obj, index, &prop))
+        if (!GetOwnElement(cx, obj, index, resolveFlags, &prop))
             return false;
 
         if (!prop.isUndefined()) {
             *found = true;
             return true;
         }
 
         obj = obj->getProto();
@@ -614,89 +619,92 @@ js::HasElement(JSContext *cx, ObjectImpl
     } while (false);
 
     MOZ_NOT_REACHED("buggy control flow");
     return false;
 }
 
 bool
 js::DefineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc,
-                  bool shouldThrow, bool *succeeded)
+                  bool shouldThrow, unsigned resolveFlags, bool *succeeded)
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
 
     ElementsHeader &header = obj->elementsHeader();
 
     switch (header.kind()) {
       case DenseElements:
         return header.asDenseElements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                      succeeded);
+                                                      resolveFlags, succeeded);
       case SparseElements:
         return header.asSparseElements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                       succeeded);
+                                                       resolveFlags, succeeded);
       case Uint8Elements:
         return header.asUint8Elements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                      succeeded);
+                                                      resolveFlags, succeeded);
       case Int8Elements:
         return header.asInt8Elements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                     succeeded);
+                                                     resolveFlags, succeeded);
       case Uint16Elements:
         return header.asUint16Elements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                       succeeded);
+                                                       resolveFlags, succeeded);
       case Int16Elements:
         return header.asInt16Elements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                      succeeded);
+                                                      resolveFlags, succeeded);
       case Uint32Elements:
         return header.asUint32Elements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                       succeeded);
+                                                       resolveFlags, succeeded);
       case Int32Elements:
         return header.asInt32Elements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                      succeeded);
+                                                      resolveFlags, succeeded);
       case Uint8ClampedElements:
         return header.asUint8ClampedElements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                             succeeded);
+                                                             resolveFlags, succeeded);
       case Float32Elements:
         return header.asFloat32Elements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                        succeeded);
+                                                        resolveFlags, succeeded);
       case Float64Elements:
         return header.asFloat64Elements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                        succeeded);
+                                                        resolveFlags, succeeded);
       case ArrayBufferElements:
         return header.asArrayBufferElements().defineElement(cx, obj, index, desc, shouldThrow,
-                                                            succeeded);
+                                                            resolveFlags, succeeded);
     }
 
     MOZ_NOT_REACHED("bad elements kind!");
     return false;
 }
 
 bool
 SparseElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver,
-                                 uint32_t index, const Value &v, bool *succeeded)
+                                 uint32_t index, const Value &v, unsigned resolveFlags,
+                                 bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
     return false;
 }
 
 bool
 DenseElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver,
-                                uint32_t index, const Value &v, bool *succeeded)
+                                uint32_t index, const Value &v, unsigned resolveFlags,
+                                bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
     return false;
 }
 
 template <typename T>
 bool
 TypedElementsHeader<T>::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver,
-                                   uint32_t index, const Value &v, bool *succeeded)
+                                   uint32_t index, const Value &v, unsigned resolveFlags,
+                                   bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     uint32_t len = length();
     if (index >= len) {
         /*
          * Silent ignore is better than an exception here, because at some
          * point we may want to support other properties on these objects.
@@ -727,58 +735,60 @@ TypedElementsHeader<T>::setElement(JSCon
 
     assign(index, d);
     *succeeded = true;
     return true;
 }
 
 bool
 ArrayBufferElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver,
-                                      uint32_t index, const Value &v, bool *succeeded)
+                                      uint32_t index, const Value &v, unsigned resolveFlags,
+                                      bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     JSObject *delegate = ArrayBufferDelegate(cx, obj);
     if (!delegate)
         return false;
-    return SetElement(cx, obj, receiver, index, v, succeeded);
+    return SetElement(cx, obj, receiver, index, v, resolveFlags, succeeded);
 }
 
 bool
 js::SetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index,
-               const Value &v, bool *succeeded)
+               const Value &v, unsigned resolveFlags, bool *succeeded)
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
 
     do {
         MOZ_ASSERT(obj);
 
         if (static_cast<JSObject *>(obj)->isProxy()) { // XXX
             MOZ_NOT_REACHED("NYI: proxy [[SetP]]");
             return false;
         }
 
         PropDesc ownDesc;
-        if (!GetOwnElement(cx, obj, index, &ownDesc))
+        if (!GetOwnElement(cx, obj, index, resolveFlags, &ownDesc))
             return false;
 
         if (!ownDesc.isUndefined()) {
             if (ownDesc.isDataDescriptor()) {
                 if (!ownDesc.writable()) {
                     *succeeded = false;
                     return true;
                 }
 
                 if (receiver == obj) {
                     PropDesc updateDesc = PropDesc::valueOnly(v);
-                    return DefineElement(cx, receiver, index, updateDesc, false, succeeded);
+                    return DefineElement(cx, receiver, index, updateDesc, false, resolveFlags,
+                                         succeeded);
                 }
 
                 PropDesc newDesc;
-                return DefineElement(cx, receiver, index, newDesc, false, succeeded);
+                return DefineElement(cx, receiver, index, newDesc, false, resolveFlags, succeeded);
             }
 
             if (ownDesc.isAccessorDescriptor()) {
                 Value setter = ownDesc.setterValue();
                 if (setter.isUndefined()) {
                     *succeeded = false;
                     return true;
                 }
@@ -800,14 +810,14 @@ js::SetElement(JSContext *cx, ObjectImpl
             return false;
         }
 
         obj = obj->getProto();
         if (obj)
             continue;
 
         PropDesc newDesc(v, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable);
-        return DefineElement(cx, receiver, index, newDesc, false, succeeded);
+        return DefineElement(cx, receiver, index, newDesc, false, resolveFlags, succeeded);
     } while (false);
 
     MOZ_NOT_REACHED("buggy control flow");
     return false;
 }
--- a/js/src/vm/ObjectImpl.h
+++ b/js/src/vm/ObjectImpl.h
@@ -353,23 +353,24 @@ class DenseElementsHeader : public Eleme
         return dense.initializedLength;
     }
 
     uint32_t length() const {
         MOZ_ASSERT(ElementsHeader::isDenseElements());
         return ElementsHeader::length;
     }
 
-    bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc);
+    bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, unsigned resolveFlags,
+                       PropDesc *desc);
 
     bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc,
-                       bool shouldThrow, bool *succeeded);
+                       bool shouldThrow, unsigned resolveFlags, bool *succeeded);
 
     bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index,
-                    const Value &v, bool *succeeded);
+                    const Value &v, unsigned resolveFlags, bool *succeeded);
 
   private:
     inline bool isDenseElements() const MOZ_DELETE;
     inline DenseElementsHeader & asDenseElements() MOZ_DELETE;
 
     DenseElementsHeader(const DenseElementsHeader &other) MOZ_DELETE;
     void operator=(const DenseElementsHeader &other) MOZ_DELETE;
 };
@@ -382,23 +383,24 @@ class SparseElementsHeader : public Elem
         return sparse.shape;
     }
 
     uint32_t length() const {
         MOZ_ASSERT(ElementsHeader::isSparseElements());
         return ElementsHeader::length;
     }
 
-    bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc);
+    bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, unsigned resolveFlags,
+                       PropDesc *desc);
 
     bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc,
-                       bool shouldThrow, bool *succeeded);
+                       bool shouldThrow, unsigned resolveFlags, bool *succeeded);
 
     bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index,
-                    const Value &v, bool *succeeded);
+                    const Value &v, unsigned resolveFlags, bool *succeeded);
 
   private:
     inline bool isSparseElements() const MOZ_DELETE;
     inline SparseElementsHeader & asSparseElements() MOZ_DELETE;
 
     SparseElementsHeader(const SparseElementsHeader &other) MOZ_DELETE;
     void operator=(const SparseElementsHeader &other) MOZ_DELETE;
 };
@@ -506,23 +508,24 @@ class TypedElementsHeader : public Eleme
 
   public:
     uint32_t length() const {
         MOZ_ASSERT(Uint8Elements <= kind());
         MOZ_ASSERT(kind() <= Float64Elements);
         return ElementsHeader::length;
     }
 
-    bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc);
+    bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, unsigned resolveFlags,
+                       PropDesc *desc);
 
     bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc,
-                       bool shouldThrow, bool *succeeded);
+                       bool shouldThrow, unsigned resolveFlags, bool *succeeded);
 
     bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index,
-                    const Value &v, bool *succeeded);
+                    const Value &v, unsigned resolveFlags, bool *succeeded);
 
   private:
     TypedElementsHeader(const TypedElementsHeader &other) MOZ_DELETE;
     void operator=(const TypedElementsHeader &other) MOZ_DELETE;
 };
 
 template<typename T> inline void
 TypedElementsHeader<T>::assign(uint32_t index, double d)
@@ -665,23 +668,24 @@ class Uint8ClampedElementsHeader : publi
     inline Uint8ClampedElementsHeader & asUint8ClampedElements() MOZ_DELETE;
     Uint8ClampedElementsHeader(const Uint8ClampedElementsHeader &other) MOZ_DELETE;
     void operator=(const Uint8ClampedElementsHeader &other) MOZ_DELETE;
 };
 
 class ArrayBufferElementsHeader : public ElementsHeader
 {
   public:
-    bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc);
+    bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, unsigned resolveFlags,
+                       PropDesc *desc);
 
     bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc,
-                       bool shouldThrow, bool *succeeded);
+                       bool shouldThrow, unsigned resolveFlags, bool *succeeded);
 
     bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index,
-                    const Value &v, bool *succeeded);
+                    const Value &v, unsigned resolveFlags, bool *succeeded);
 
   private:
     inline bool isArrayBufferElements() const MOZ_DELETE;
     inline ArrayBufferElementsHeader & asArrayBufferElements() MOZ_DELETE;
 
     ArrayBufferElementsHeader(const ArrayBufferElementsHeader &other) MOZ_DELETE;
     void operator=(const ArrayBufferElementsHeader &other) MOZ_DELETE;
 };
@@ -1244,29 +1248,31 @@ inline Value
 ObjectValue(ObjectImpl &obj)
 {
     Value v;
     v.setObject(*obj.asObjectPtr());
     return v;
 }
 
 bool
-GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc);
+GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, unsigned resolveFlags,
+              PropDesc *desc);
 
 /* Proposed default [[GetP]](Receiver, P) method. */
 extern bool
-GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, Value *vp);
+GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index,
+           unsigned resolveFlags, Value *vp);
 
 extern bool
 DefineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc,
-              bool shouldThrow, bool *succeeded);
+              bool shouldThrow, unsigned resolveFlags, bool *succeeded);
 
 /* Proposed default [[SetP]](Receiver, P, V) method. */
 extern bool
 SetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v,
-           bool *succeeded);
+           unsigned resolveFlags, bool *succeeded);
 
 extern bool
-HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, bool *found);
+HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, unsigned resolveFlags, bool *found);
 
 } /* namespace js */
 
 #endif /* ObjectImpl_h__ */