Bug 836949 - Remove the now unnecessary GetMethod function. r=jwalden

This commit is contained in:
Tom Schuster
2013-04-27 17:37:05 +02:00
parent e42a63db4f
commit a3bbbd1b35
11 changed files with 34 additions and 95 deletions

View File

@@ -312,7 +312,7 @@ GetCustomIterator(JSContext *cx, HandleObject obj, unsigned flags, MutableHandle
/* Check whether we have a valid __iterator__ method. */
HandlePropertyName name = cx->names().iteratorIntrinsic;
if (!GetMethod(cx, obj, name, 0, vp))
if (!JSObject::getProperty(cx, obj, obj, name, vp))
return false;
/* If there is no custom __iterator__ method, we are done here. */
@@ -1233,7 +1233,7 @@ js_IteratorMore(JSContext *cx, HandleObject iterobj, MutableHandleValue rval)
return false;
} else {
/* Call the iterator object's .next method. */
if (!GetMethod(cx, iterobj, cx->names().next, 0, rval))
if (!JSObject::getProperty(cx, iterobj, iterobj, cx->names().next, rval))
return false;
if (!Invoke(cx, ObjectValue(*iterobj), rval, 0, NULL, rval.address())) {
/* Check for StopIteration. */