Backed out changeset 67346678966f (bug 887016)
authorTooru Fujisawa <arai_a@mac.com>
Mon, 28 Mar 2016 06:49:55 +0900
changeset 290657 dd34be112501af92dcaf4f4f24e7f67a7ceaaf7e
parent 290656 ecba6c9f0bc38ece3305da035d43ffedd111bbab
child 290658 f5060d63b4f8ddbb8a5f9e6db822e283701f46f0
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs887016
milestone48.0a1
backs out67346678966fc8c40546ab49521b43049fcc851f
Backed out changeset 67346678966f (bug 887016)
js/src/jsobj.cpp
js/src/jsobj.h
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -2423,40 +2423,16 @@ js::GetGetterPure(ExclusiveContext* cx, 
         return true;
     }
 
     return pobj->isNative() &&
            NativeGetGetterPureInline(&pobj->as<NativeObject>(), shape, fp);
 }
 
 bool
-js::GetOwnNativeGetterPure(JSContext* cx, JSObject* obj, jsid id, JSNative* native)
-{
-    JS::AutoCheckCannotGC nogc;
-    *native = nullptr;
-    Shape* shape;
-    if (!LookupOwnPropertyPure(cx, obj, id, &shape))
-        return false;
-
-    if (!shape || IsImplicitDenseOrTypedArrayElement(shape) || !shape->hasGetterObject())
-        return true;
-
-    JSObject* getterObj = shape->getterObject();
-    if (!getterObj->is<JSFunction>())
-        return true;
-
-    JSFunction* getter = &getterObj->as<JSFunction>();
-    if (!getter->isNative())
-        return true;
-
-    *native = getter->native();
-    return true;
-}
-
-bool
 JSObject::reportReadOnly(JSContext* cx, jsid id, unsigned report)
 {
     RootedValue val(cx, IdToValue(id));
     return ReportValueErrorFlags(cx, report, JSMSG_READ_ONLY,
                                  JSDVG_IGNORE_STACK, val, nullptr,
                                  nullptr, nullptr);
 }
 
--- a/js/src/jsobj.h
+++ b/js/src/jsobj.h
@@ -1221,19 +1221,16 @@ LookupOwnPropertyPure(ExclusiveContext* 
 
 bool
 GetPropertyPure(ExclusiveContext* cx, JSObject* obj, jsid id, Value* vp);
 
 bool
 GetGetterPure(ExclusiveContext* cx, JSObject* obj, jsid id, JSFunction** fp);
 
 bool
-GetOwnNativeGetterPure(JSContext* cx, JSObject* obj, jsid id, JSNative* native);
-
-bool
 GetOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id,
                          MutableHandle<PropertyDescriptor> desc);
 
 bool
 GetOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue vp);
 
 /*
  * ES6 draft rev 32 (2015 Feb 2) 6.2.4.4 FromPropertyDescriptor(Desc).