Bug 1603406 - Part 6: Unused JSObject functions. r=mgaudet
authorAndré Bargull <andre.bargull@gmail.com>
Thu, 12 Dec 2019 16:38:56 +0000
changeset 506874 57f4762ebcc7b78cdc9b9ce0f52f4f180081ff1a
parent 506873 33fa17e0b2cf5ed1b75987319fbf3691605dc4bf
child 506875 8f641c97393a5408fec722c247213eac6393b083
push id36913
push useropoprus@mozilla.com
push dateFri, 13 Dec 2019 16:53:24 +0000
treeherdermozilla-central@1ed684598bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmgaudet
bugs1603406
milestone73.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 1603406 - Part 6: Unused JSObject functions. r=mgaudet Depends on D56894 Differential Revision: https://phabricator.services.mozilla.com/D56895
js/src/vm/JSObject.cpp
js/src/vm/ObjectOperations.h
--- a/js/src/vm/JSObject.cpp
+++ b/js/src/vm/JSObject.cpp
@@ -2946,33 +2946,16 @@ bool js::DefineDataProperty(JSContext* c
   desc.initFields(nullptr, value, attrs, nullptr, nullptr);
   if (DefinePropertyOp op = obj->getOpsDefineProperty()) {
     MOZ_ASSERT(!cx->isHelperThreadContext());
     return op(cx, obj, id, desc, result);
   }
   return NativeDefineProperty(cx, obj.as<NativeObject>(), id, desc, result);
 }
 
-bool js::DefineDataProperty(JSContext* cx, HandleObject obj, PropertyName* name,
-                            HandleValue value, unsigned attrs,
-                            ObjectOpResult& result) {
-  RootedId id(cx, NameToId(name));
-  return DefineDataProperty(cx, obj, id, value, attrs, result);
-}
-
-bool js::DefineDataElement(JSContext* cx, HandleObject obj, uint32_t index,
-                           HandleValue value, unsigned attrs,
-                           ObjectOpResult& result) {
-  RootedId id(cx);
-  if (!IndexToId(cx, index, &id)) {
-    return false;
-  }
-  return DefineDataProperty(cx, obj, id, value, attrs, result);
-}
-
 bool js::DefineAccessorProperty(JSContext* cx, HandleObject obj, HandleId id,
                                 HandleObject getter, HandleObject setter,
                                 unsigned attrs) {
   ObjectOpResult result;
   if (!DefineAccessorProperty(cx, obj, id, getter, setter, attrs, result)) {
     return false;
   }
   if (!result) {
--- a/js/src/vm/ObjectOperations.h
+++ b/js/src/vm/ObjectOperations.h
@@ -103,24 +103,16 @@ extern bool DefineAccessorProperty(JSCon
                                    JS::Handle<JSObject*> getter,
                                    JS::Handle<JSObject*> setter, unsigned attrs,
                                    JS::ObjectOpResult& result);
 
 extern bool DefineDataProperty(JSContext* cx, JS::Handle<JSObject*> obj,
                                JS::Handle<jsid> id, JS::Handle<JS::Value> value,
                                unsigned attrs, JS::ObjectOpResult& result);
 
-extern bool DefineDataProperty(JSContext* cx, JS::Handle<JSObject*> obj,
-                               PropertyName* name, JS::Handle<JS::Value> value,
-                               unsigned attrs, JS::ObjectOpResult& result);
-
-extern bool DefineDataElement(JSContext* cx, JS::Handle<JSObject*> obj,
-                              uint32_t index, JS::Handle<JS::Value> value,
-                              unsigned attrs, JS::ObjectOpResult& result);
-
 extern bool DefineAccessorProperty(JSContext* cx, JS::Handle<JSObject*> obj,
                                    JS::Handle<jsid> id,
                                    JS::Handle<JSObject*> getter,
                                    JS::Handle<JSObject*> setter,
                                    unsigned attrs = JSPROP_ENUMERATE);
 
 extern bool DefineDataProperty(JSContext* cx, JS::Handle<JSObject*> obj,
                                JS::Handle<jsid> id, JS::Handle<JS::Value> value,