Bug 774607 - Remove JS_{Is,Make}SystemObject API. r=luke

This commit is contained in:
Bobby Holley 2012-09-05 11:32:07 -07:00
parent c466facab9
commit f8b9fcd4e5
6 changed files with 8 additions and 57 deletions

View File

@ -1034,18 +1034,6 @@ JS_GetScriptTotalSize(JSContext *cx, JSScript *script)
return nbytes;
}
JS_PUBLIC_API(JSBool)
JS_IsSystemObject(JSContext *cx, JSObject *obj)
{
return obj->isSystem();
}
JS_PUBLIC_API(JSBool)
JS_MakeSystemObject(JSContext *cx, JSObject *obj)
{
return obj->setSystem(cx);
}
/************************************************************************/
JS_FRIEND_API(void)

View File

@ -354,23 +354,6 @@ JS_GetFunctionTotalSize(JSContext *cx, JSFunction *fun);
extern JS_PUBLIC_API(size_t)
JS_GetScriptTotalSize(JSContext *cx, JSScript *script);
/*
* Return true if obj is a "system" object, that is, one created by
* JS_NewSystemObject with the system flag set and not JS_NewObject.
*
* What "system" means is up to the API client.
*/
extern JS_PUBLIC_API(JSBool)
JS_IsSystemObject(JSContext *cx, JSObject *obj);
/*
* Mark an object as being a system object. This should be called immediately
* after allocating the object. A system object is an object for which
* JS_IsSystemObject returns true.
*/
extern JS_PUBLIC_API(JSBool)
JS_MakeSystemObject(JSContext *cx, JSObject *obj);
/************************************************************************/
extern JS_FRIEND_API(void)

View File

@ -5367,7 +5367,6 @@ JSObject::dump()
fprintf(stderr, "flags:");
if (obj->isDelegate()) fprintf(stderr, " delegate");
if (obj->isSystem()) fprintf(stderr, " system");
if (!obj->isExtensible()) fprintf(stderr, " not_extensible");
if (obj->isIndexed()) fprintf(stderr, " indexed");

View File

@ -320,14 +320,6 @@ struct JSObject : public js::ObjectImpl
inline bool isBoundFunction() const;
/*
* The meaning of the system object bit is defined by the API client. It is
* set in JS_NewSystemObject and is queried by JS_IsSystemObject, but it
* has no intrinsic meaning to SpiderMonkey.
*/
inline bool isSystem() const;
inline bool setSystem(JSContext *cx);
inline bool hasSpecialEquality() const;
inline bool watched() const;

View File

@ -700,16 +700,6 @@ inline bool JSObject::setIteratedSingleton(JSContext *cx)
return setFlag(cx, js::BaseShape::ITERATED_SINGLETON);
}
inline bool JSObject::isSystem() const
{
return lastProperty()->hasObjectFlag(js::BaseShape::SYSTEM);
}
inline bool JSObject::setSystem(JSContext *cx)
{
return setFlag(cx, js::BaseShape::SYSTEM);
}
inline bool JSObject::setDelegate(JSContext *cx)
{
return setFlag(cx, js::BaseShape::DELEGATE, GENERATE_SHAPE);

View File

@ -255,15 +255,14 @@ class BaseShape : public js::gc::Cell
*/
DELEGATE = 0x8,
SYSTEM = 0x10,
NOT_EXTENSIBLE = 0x20,
INDEXED = 0x40,
BOUND_FUNCTION = 0x80,
VAROBJ = 0x100,
WATCHED = 0x200,
ITERATED_SINGLETON = 0x400,
NEW_TYPE_UNKNOWN = 0x800,
UNCACHEABLE_PROTO = 0x1000,
NOT_EXTENSIBLE = 0x10,
INDEXED = 0x20,
BOUND_FUNCTION = 0x40,
VAROBJ = 0x80,
WATCHED = 0x100,
ITERATED_SINGLETON = 0x200,
NEW_TYPE_UNKNOWN = 0x400,
UNCACHEABLE_PROTO = 0x800,
OBJECT_FLAG_MASK = 0x1ff8
};