Bug 909171 (part 1) - Add JS_ prefixes to macros missing them in jsversion.h. r=luke.

--HG--
extra : rebase_source : f8afce8bbed7a940e9168f4f851d18c5d30620e7
This commit is contained in:
Nicholas Nethercote 2013-08-26 17:09:27 -07:00
parent 12a52bc027
commit b297eab2c2
8 changed files with 22 additions and 22 deletions

View File

@ -341,7 +341,7 @@ obj_valueOf(JSContext *cx, unsigned argc, Value *vp)
return true;
}
#if OLD_GETTER_SETTER_METHODS
#if JS_OLD_GETTER_SETTER_METHODS
enum DefineType { Getter, Setter };
@ -479,7 +479,7 @@ obj_lookupSetter(JSContext *cx, unsigned argc, Value *vp)
}
return true;
}
#endif /* OLD_GETTER_SETTER_METHODS */
#endif /* JS_OLD_GETTER_SETTER_METHODS */
/* ES5 15.2.3.2. */
bool
@ -977,7 +977,7 @@ const JSFunctionSpec js::object_methods[] = {
JS_FN(js_hasOwnProperty_str, obj_hasOwnProperty, 1,0),
JS_FN(js_isPrototypeOf_str, obj_isPrototypeOf, 1,0),
JS_FN(js_propertyIsEnumerable_str, obj_propertyIsEnumerable, 1,0),
#if OLD_GETTER_SETTER_METHODS
#if JS_OLD_GETTER_SETTER_METHODS
JS_FN(js_defineGetter_str, js::obj_defineGetter, 2,0),
JS_FN(js_defineSetter_str, js::obj_defineSetter, 2,0),
JS_FN(js_lookupGetter_str, obj_lookupGetter, 1,0),

View File

@ -1480,7 +1480,7 @@ static const JSStdName object_prototype_names[] = {
{js_InitObjectClass, EAGER_ATOM(hasOwnProperty), &JSObject::class_},
{js_InitObjectClass, EAGER_ATOM(isPrototypeOf), &JSObject::class_},
{js_InitObjectClass, EAGER_ATOM(propertyIsEnumerable), &JSObject::class_},
#if OLD_GETTER_SETTER_METHODS
#if JS_OLD_GETTER_SETTER_METHODS
{js_InitObjectClass, EAGER_ATOM(defineGetter), &JSObject::class_},
{js_InitObjectClass, EAGER_ATOM(defineSetter), &JSObject::class_},
{js_InitObjectClass, EAGER_ATOM(lookupGetter), &JSObject::class_},

View File

@ -240,7 +240,7 @@ typedef bool
extern JS_FRIEND_API(void)
DumpHeapComplete(JSRuntime *rt, FILE *fp);
#ifdef OLD_GETTER_SETTER_METHODS
#ifdef JS_OLD_GETTER_SETTER_METHODS
JS_FRIEND_API(bool) obj_defineGetter(JSContext *cx, unsigned argc, js::Value *vp);
JS_FRIEND_API(bool) obj_defineSetter(JSContext *cx, unsigned argc, js::Value *vp);
#endif

View File

@ -1112,7 +1112,7 @@ extern const char js_hasOwnProperty_str[];
extern const char js_isPrototypeOf_str[];
extern const char js_propertyIsEnumerable_str[];
#ifdef OLD_GETTER_SETTER_METHODS
#ifdef JS_OLD_GETTER_SETTER_METHODS
extern const char js_defineGetter_str[];
extern const char js_defineSetter_str[];
extern const char js_lookupGetter_str[];

View File

@ -52,15 +52,15 @@
* Feature for Object.prototype.__{define,lookup}{G,S}etter__ legacy support;
* support likely to be made opt-in at some future time.
*/
#define OLD_GETTER_SETTER_METHODS 1
#define JS_OLD_GETTER_SETTER_METHODS 1
/* A kill-switch for bug 586842. Embedders shouldn't touch this! */
#define USE_NEW_OBJECT_REPRESENTATION 0
#define JS_USE_NEW_OBJECT_REPRESENTATION 0
#if USE_NEW_OBJECT_REPRESENTATION
# define NEW_OBJECT_REPRESENTATION_ONLY() ((void)0)
#if JS_USE_NEW_OBJECT_REPRESENTATION
# define JS_NEW_OBJECT_REPRESENTATION_ONLY() ((void)0)
#else
# define NEW_OBJECT_REPRESENTATION_ONLY() \
# define JS_NEW_OBJECT_REPRESENTATION_ONLY() \
MOZ_ASSUME_UNREACHABLE("don't call this! to be used in the new object representation")
#endif

View File

@ -561,7 +561,7 @@ bool
js::GetOwnProperty(JSContext *cx, Handle<ObjectImpl*> obj, PropertyId pid_, unsigned resolveFlags,
PropDesc *desc)
{
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
JS_CHECK_RECURSION(cx, return false);
@ -651,7 +651,7 @@ bool
js::GetProperty(JSContext *cx, Handle<ObjectImpl*> obj, Handle<ObjectImpl*> receiver,
Handle<PropertyId> pid, unsigned resolveFlags, MutableHandle<Value> vp)
{
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
MOZ_ASSERT(receiver);
@ -714,7 +714,7 @@ bool
js::GetElement(JSContext *cx, Handle<ObjectImpl*> obj, Handle<ObjectImpl*> receiver, uint32_t index,
unsigned resolveFlags, Value *vp)
{
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
Rooted<ObjectImpl*> current(cx, obj);
@ -777,7 +777,7 @@ bool
js::HasElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index, unsigned resolveFlags,
bool *found)
{
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
Rooted<ObjectImpl*> current(cx, obj);
@ -811,7 +811,7 @@ bool
js::DefineElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index, const PropDesc &desc,
bool shouldThrow, unsigned resolveFlags, bool *succeeded)
{
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
ElementsHeader &header = obj->elementsHeader();
@ -937,7 +937,7 @@ bool
js::SetElement(JSContext *cx, Handle<ObjectImpl*> obj, Handle<ObjectImpl*> receiver,
uint32_t index, const Value &v, unsigned resolveFlags, bool *succeeded)
{
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
Rooted<ObjectImpl*> current(cx, obj);
RootedValue setter(cx);

View File

@ -1284,7 +1284,7 @@ class ObjectImpl : public gc::Cell
}
bool makeElementsSparse(JSContext *cx) {
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
MOZ_ASSUME_UNREACHABLE("NYI");
}
@ -1412,7 +1412,7 @@ class ObjectImpl : public gc::Cell
DenseElementsResult ensureDenseElementsInitialized(JSContext *cx, uint32_t index,
uint32_t extra)
{
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
MOZ_ASSUME_UNREACHABLE("NYI");
}
@ -1623,7 +1623,7 @@ class ObjectImpl : public gc::Cell
}
ElementsHeader & elementsHeader() const {
NEW_OBJECT_REPRESENTATION_ONLY();
JS_NEW_OBJECT_REPRESENTATION_ONLY();
return *ElementsHeader::fromElements(elements);
}

View File

@ -43,7 +43,7 @@
#include "vm/GlobalObject-inl.h"
#if USE_NEW_OBJECT_REPRESENTATION
#if JS_USE_NEW_OBJECT_REPRESENTATION
// See the comment above OldObjectRepresentationHack.
# error "TypedArray support for new object representation unimplemented."
#endif
@ -294,7 +294,7 @@ PostBarrierTypedArrayObject(JSObject *obj)
// the slots are already being used for the element storage and the private
// field is used for a delegate object. The ObjectElements header has space
// for it, but I don't want to mess around with adding unions to it with
// USE_NEW_OBJECT_REPRESENTATION pending, since it will solve this much
// JS_USE_NEW_OBJECT_REPRESENTATION pending, since it will solve this much
// more cleanly.
struct OldObjectRepresentationHack {
uint32_t capacity;