diff --git a/js/src/jsapi.h b/js/src/jsapi.h index c94403b721d..fb0186c49d3 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -4846,14 +4846,14 @@ class MOZ_STACK_CLASS JS_PUBLIC_API(ForOfIterator) { * of throwing. Callers should then check valueIsIterable() before * continuing with the iteration. */ - JS_PUBLIC_API(bool) init(JS::HandleValue iterable, - NonIterableBehavior nonIterableBehavior = ThrowOnNonIterable); + bool init(JS::HandleValue iterable, + NonIterableBehavior nonIterableBehavior = ThrowOnNonIterable); /* * Get the next value from the iterator. If false *done is true * after this call, do not examine val. */ - JS_PUBLIC_API(bool) next(JS::MutableHandleValue val, bool *done); + bool next(JS::MutableHandleValue val, bool *done); /* * If initialized with throwOnNonCallable = false, check whether diff --git a/js/src/jsiter.cpp b/js/src/jsiter.cpp index 97c35c5d94c..93c028ccc5a 100644 --- a/js/src/jsiter.cpp +++ b/js/src/jsiter.cpp @@ -15,7 +15,6 @@ #include "jsarray.h" #include "jsatom.h" #include "jscntxt.h" -#include "jsfriendapi.h" #include "jsgc.h" #include "jsobj.h" #include "jsopcode.h" @@ -1270,7 +1269,7 @@ const Class StopIterationObject::class_ = { nullptr /* construct */ }; -JS_FRIEND_API(bool) +bool ForOfIterator::init(HandleValue iterable, NonIterableBehavior nonIterableBehavior) { JSContext *cx = cx_; @@ -1314,7 +1313,7 @@ ForOfIterator::init(HandleValue iterable, NonIterableBehavior nonIterableBehavio return true; } -JS_FRIEND_API(bool) +bool ForOfIterator::next(MutableHandleValue vp, bool *done) { JS_ASSERT(iterator); diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp index eb816311f35..166e2f9582f 100644 --- a/js/src/vm/Interpreter.cpp +++ b/js/src/vm/Interpreter.cpp @@ -59,6 +59,7 @@ using namespace js::types; using mozilla::DebugOnly; using mozilla::DoubleEqualsInt32; using mozilla::PodCopy; +using JS::ForOfIterator; /* * Note: when Clang 3.2 (32-bit) inlines the two functions below in Interpret,