Followup bustage fix for bug 952873 to fix CLOSED TREE
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 28 Jan 2014 17:54:31 -0800
changeset 181737 2ebe01b13b3288ded4f18d2276df2f41605dfac7
parent 181736 f45d7708826f2567dd6372e23af06b5315444dd0
child 181738 b8a6bf4b4fa3f2c8f171a01bfd8ea01ff84b40d1
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs952873
milestone29.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
Followup bustage fix for bug 952873 to fix CLOSED TREE
js/src/jsapi.h
js/src/jsiter.cpp
js/src/vm/Interpreter.cpp
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -4841,24 +4841,24 @@ class MOZ_STACK_CLASS JS_PUBLIC_API(ForO
     };
 
     /*
      * Initialize the iterator.  If AllowNonIterable is passed then if iterable
      * does not have a callable @@iterator init() will just return true instead
      * 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
      * the value is iterable.
      */
     bool valueIsIterable() const {
         return iterator;
     }
--- a/js/src/jsiter.cpp
+++ b/js/src/jsiter.cpp
@@ -10,17 +10,16 @@
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/PodOperations.h"
 
 #include "jsarray.h"
 #include "jsatom.h"
 #include "jscntxt.h"
-#include "jsfriendapi.h"
 #include "jsgc.h"
 #include "jsobj.h"
 #include "jsopcode.h"
 #include "jsproxy.h"
 #include "jsscript.h"
 #include "jstypes.h"
 #include "jsutil.h"
 
@@ -1265,17 +1264,17 @@ const Class StopIterationObject::class_ 
     JS_ResolveStub,
     JS_ConvertStub,
     nullptr,                 /* finalize    */
     nullptr,                 /* call        */
     stopiter_hasInstance,
     nullptr                  /* construct   */
 };
 
-JS_FRIEND_API(bool)
+bool
 ForOfIterator::init(HandleValue iterable, NonIterableBehavior nonIterableBehavior)
 {
     JSContext *cx = cx_;
     RootedObject iterableObj(cx, ToObject(cx, iterable));
     if (!iterableObj)
         return false;
 
     // The iterator is the result of calling obj[@@iterator]().
@@ -1309,17 +1308,17 @@ ForOfIterator::init(HandleValue iterable
 
     iterator = ToObject(cx, args.rval());
     if (!iterator)
         return false;
 
     return true;
 }
 
-JS_FRIEND_API(bool)
+bool
 ForOfIterator::next(MutableHandleValue vp, bool *done)
 {
     JS_ASSERT(iterator);
 
     JSContext *cx = cx_;
     RootedValue method(cx);
     if (!JSObject::getProperty(cx, iterator, iterator, cx->names().next, &method))
         return false;
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -54,16 +54,17 @@
 
 using namespace js;
 using namespace js::gc;
 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,
  * the conservative stack scanner leaks a ton of memory and this negatively
  * influences performance. The MOZ_NEVER_INLINE is a temporary workaround until
  * we can remove the conservative scanner. See bug 849526 for more info.
  */
 #if defined(__clang__) && defined(JS_CPU_X86)