Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Commit

Permalink
js::IsInRequest is defined in RELEASE mode as well
Browse files Browse the repository at this point in the history
needed for the bindings
  • Loading branch information
ricardoquesada committed Oct 31, 2013
1 parent 3ee4df7 commit 333f7ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions js/public/RootingAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,12 @@ struct GCMethods<T *>
#endif
};

#if defined(DEBUG)
// XXX: Needed for cocos2d JS Bindings
//#if defined(DEBUG)
/* This helper allows us to assert that Rooted<T> is scoped within a request. */
extern JS_PUBLIC_API(bool)
IsInRequest(JSContext *cx);
#endif
//#endif

} /* namespace js */

Expand Down
5 changes: 3 additions & 2 deletions js/src/jsfriendapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,8 @@ js_ReportIsNotFunction(JSContext *cx, const JS::Value& v)
return ReportIsNotFunction(cx, v);
}

#ifdef DEBUG
// XXX: Needed for cocos2d JS Bindings
//#ifdef DEBUG
JS_PUBLIC_API(bool)
js::IsInRequest(JSContext *cx)
{
Expand All @@ -1143,7 +1144,7 @@ js::IsInRequest(JSContext *cx)
return true;
#endif
}
#endif
//#endif

#ifdef JSGC_GENERATIONAL
JS_FRIEND_API(void)
Expand Down

0 comments on commit 333f7ff

Please sign in to comment.