Backout bug 639227 due to orange.

This commit is contained in:
Andreas Gal 2011-03-06 21:37:13 -08:00
parent 52c4d6513a
commit 831efbf9e8
12 changed files with 27 additions and 20 deletions

View File

@ -2017,7 +2017,7 @@ struct JSClass {
& JSCLASS_CACHED_PROTO_MASK)) & JSCLASS_CACHED_PROTO_MASK))
/* Initializer for unused members of statically initialized JSClass structs. */ /* Initializer for unused members of statically initialized JSClass structs. */
#define JSCLASS_NO_INTERNAL_MEMBERS 0,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} #define JSCLASS_NO_INTERNAL_MEMBERS 0,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
#define JSCLASS_NO_OPTIONAL_MEMBERS 0,0,0,0,0,0,0,JSCLASS_NO_INTERNAL_MEMBERS #define JSCLASS_NO_OPTIONAL_MEMBERS 0,0,0,0,0,0,0,JSCLASS_NO_INTERNAL_MEMBERS
struct JSIdArray { struct JSIdArray {

View File

@ -984,7 +984,7 @@ Class js_ArrayClass = {
NULL, /* construct */ NULL, /* construct */
NULL, /* xdrObject */ NULL, /* xdrObject */
NULL, /* hasInstance */ NULL, /* hasInstance */
array_trace, /* trace */ NULL, /* mark */
JS_NULL_CLASS_EXT, JS_NULL_CLASS_EXT,
{ {
array_lookupProperty, array_lookupProperty,
@ -996,6 +996,7 @@ Class js_ArrayClass = {
array_deleteProperty, array_deleteProperty,
NULL, /* enumerate */ NULL, /* enumerate */
array_typeOf, array_typeOf,
array_trace,
array_fix, array_fix,
NULL, /* thisObject */ NULL, /* thisObject */
NULL, /* clear */ NULL, /* clear */

View File

@ -284,8 +284,9 @@ MarkChildren(JSTracer *trc, JSObject *obj)
} }
} }
if (obj->isNative()) /* Delegate to ops or the native marking op. */
js_TraceObject(trc, obj); TraceOp op = obj->getOps()->trace;
(op ? op : js_TraceObject)(trc, obj);
} }
static inline void static inline void

View File

@ -3221,7 +3221,7 @@ Class js_WithClass = {
NULL, /* construct */ NULL, /* construct */
NULL, /* xdrObject */ NULL, /* xdrObject */
NULL, /* hasInstance */ NULL, /* hasInstance */
NULL, /* trace */ NULL, /* mark */
JS_NULL_CLASS_EXT, JS_NULL_CLASS_EXT,
{ {
with_LookupProperty, with_LookupProperty,
@ -3233,6 +3233,7 @@ Class js_WithClass = {
with_DeleteProperty, with_DeleteProperty,
with_Enumerate, with_Enumerate,
with_TypeOf, with_TypeOf,
NULL, /* trace */
NULL, /* fix */ NULL, /* fix */
with_ThisObject, with_ThisObject,
NULL, /* clear */ NULL, /* clear */

View File

@ -972,14 +972,6 @@ proxy_TraceObject(JSTracer *trc, JSObject *obj)
} }
} }
static void
proxy_TraceFunction(JSTracer *trc, JSObject *obj)
{
proxy_TraceObject(trc, obj);
MarkValue(trc, GetCall(obj), "call");
MarkValue(trc, GetConstruct(obj), "construct");
}
static void static void
proxy_Finalize(JSContext *cx, JSObject *obj) proxy_Finalize(JSContext *cx, JSObject *obj)
{ {
@ -1023,7 +1015,7 @@ JS_FRIEND_API(Class) ObjectProxyClass = {
NULL, /* construct */ NULL, /* construct */
NULL, /* xdrObject */ NULL, /* xdrObject */
proxy_HasInstance, /* hasInstance */ proxy_HasInstance, /* hasInstance */
proxy_TraceObject, /* trace */ NULL, /* mark */
JS_NULL_CLASS_EXT, JS_NULL_CLASS_EXT,
{ {
proxy_LookupProperty, proxy_LookupProperty,
@ -1035,6 +1027,7 @@ JS_FRIEND_API(Class) ObjectProxyClass = {
proxy_DeleteProperty, proxy_DeleteProperty,
NULL, /* enumerate */ NULL, /* enumerate */
proxy_TypeOf, proxy_TypeOf,
proxy_TraceObject,
NULL, /* fix */ NULL, /* fix */
NULL, /* thisObject */ NULL, /* thisObject */
NULL, /* clear */ NULL, /* clear */
@ -1058,7 +1051,7 @@ JS_FRIEND_API(Class) OuterWindowProxyClass = {
NULL, /* construct */ NULL, /* construct */
NULL, /* xdrObject */ NULL, /* xdrObject */
NULL, /* hasInstance */ NULL, /* hasInstance */
proxy_TraceObject, /* trace */ NULL, /* mark */
{ {
NULL, /* equality */ NULL, /* equality */
NULL, /* outerObject */ NULL, /* outerObject */
@ -1075,6 +1068,7 @@ JS_FRIEND_API(Class) OuterWindowProxyClass = {
proxy_DeleteProperty, proxy_DeleteProperty,
NULL, /* enumerate */ NULL, /* enumerate */
NULL, /* typeof */ NULL, /* typeof */
proxy_TraceObject,
NULL, /* fix */ NULL, /* fix */
NULL, /* thisObject */ NULL, /* thisObject */
NULL, /* clear */ NULL, /* clear */
@ -1117,7 +1111,7 @@ JS_FRIEND_API(Class) FunctionProxyClass = {
proxy_Construct, proxy_Construct,
NULL, /* xdrObject */ NULL, /* xdrObject */
js_FunctionClass.hasInstance, js_FunctionClass.hasInstance,
proxy_TraceFunction, /* trace */ NULL, /* mark */
JS_NULL_CLASS_EXT, JS_NULL_CLASS_EXT,
{ {
proxy_LookupProperty, proxy_LookupProperty,
@ -1129,6 +1123,7 @@ JS_FRIEND_API(Class) FunctionProxyClass = {
proxy_DeleteProperty, proxy_DeleteProperty,
NULL, /* enumerate */ NULL, /* enumerate */
proxy_TypeOf, proxy_TypeOf,
proxy_TraceObject,
NULL, /* fix */ NULL, /* fix */
NULL, /* thisObject */ NULL, /* thisObject */
NULL, /* clear */ NULL, /* clear */

View File

@ -1499,7 +1499,7 @@ template<> JSFunctionSpec _typedArray::jsfuncs[] = { \
NULL, /* construct */ \ NULL, /* construct */ \
NULL, /* xdrObject */ \ NULL, /* xdrObject */ \
NULL, /* hasInstance */ \ NULL, /* hasInstance */ \
_typedArray::obj_trace, \ NULL, /* mark */ \
JS_NULL_CLASS_EXT, \ JS_NULL_CLASS_EXT, \
{ \ { \
_typedArray::obj_lookupProperty, \ _typedArray::obj_lookupProperty, \
@ -1511,6 +1511,7 @@ template<> JSFunctionSpec _typedArray::jsfuncs[] = { \
_typedArray::obj_deleteProperty, \ _typedArray::obj_deleteProperty, \
_typedArray::obj_enumerate, \ _typedArray::obj_enumerate, \
_typedArray::obj_typeOf, \ _typedArray::obj_typeOf, \
_typedArray::obj_trace, \
NULL, /* thisObject */ \ NULL, /* thisObject */ \
NULL, /* clear */ \ NULL, /* clear */ \
} \ } \

View File

@ -924,6 +924,8 @@ typedef JSBool
(* AttributesOp)(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp); (* AttributesOp)(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
typedef JSType typedef JSType
(* TypeOfOp)(JSContext *cx, JSObject *obj); (* TypeOfOp)(JSContext *cx, JSObject *obj);
typedef void
(* TraceOp)(JSTracer *trc, JSObject *obj);
typedef JSObject * typedef JSObject *
(* ObjectOp)(JSContext *cx, JSObject *obj); (* ObjectOp)(JSContext *cx, JSObject *obj);
typedef void typedef void
@ -1016,6 +1018,7 @@ struct ObjectOps {
js::DeleteIdOp deleteProperty; js::DeleteIdOp deleteProperty;
js::NewEnumerateOp enumerate; js::NewEnumerateOp enumerate;
js::TypeOfOp typeOf; js::TypeOfOp typeOf;
js::TraceOp trace;
js::FixOp fix; js::FixOp fix;
js::ObjectOp thisObject; js::ObjectOp thisObject;
js::FinalizeOp clear; js::FinalizeOp clear;

View File

@ -5143,6 +5143,7 @@ JS_FRIEND_DATA(Class) js_XMLClass = {
xml_deleteProperty, xml_deleteProperty,
xml_enumerate, xml_enumerate,
xml_typeOf, xml_typeOf,
NULL, /* trace */
xml_fix, xml_fix,
NULL, /* thisObject */ NULL, /* thisObject */
xml_clear xml_clear

View File

@ -3242,6 +3242,7 @@ static Class split_global_class = {
NULL, /* deleteProperty */ NULL, /* deleteProperty */
NULL, /* enumerate */ NULL, /* enumerate */
NULL, /* typeOf */ NULL, /* typeOf */
NULL, /* trace */
NULL, /* fix */ NULL, /* fix */
split_thisObject, split_thisObject,
NULL, /* clear */ NULL, /* clear */

View File

@ -1457,6 +1457,7 @@ XPC_WN_JSOp_ThisObject(JSContext *cx, JSObject *obj);
nsnull, /* deleteProperty */ \ nsnull, /* deleteProperty */ \
js::Valueify(XPC_WN_JSOp_Enumerate), \ js::Valueify(XPC_WN_JSOp_Enumerate), \
XPC_WN_JSOp_TypeOf_Function, \ XPC_WN_JSOp_TypeOf_Function, \
nsnull, /* trace */ \
nsnull, /* fix */ \ nsnull, /* fix */ \
XPC_WN_JSOp_ThisObject, \ XPC_WN_JSOp_ThisObject, \
XPC_WN_JSOp_Clear \ XPC_WN_JSOp_Clear \
@ -1473,6 +1474,7 @@ XPC_WN_JSOp_ThisObject(JSContext *cx, JSObject *obj);
nsnull, /* deleteProperty */ \ nsnull, /* deleteProperty */ \
js::Valueify(XPC_WN_JSOp_Enumerate), \ js::Valueify(XPC_WN_JSOp_Enumerate), \
XPC_WN_JSOp_TypeOf_Object, \ XPC_WN_JSOp_TypeOf_Object, \
nsnull, /* trace */ \
nsnull, /* fix */ \ nsnull, /* fix */ \
XPC_WN_JSOp_ThisObject, \ XPC_WN_JSOp_ThisObject, \
XPC_WN_JSOp_Clear \ XPC_WN_JSOp_Clear \

View File

@ -893,7 +893,7 @@ js::Class XPC_WN_NoHelper_JSClass = {
nsnull, // construct nsnull, // construct
nsnull, // xdrObject; nsnull, // xdrObject;
nsnull, // hasInstance nsnull, // hasInstance
XPC_WN_Shared_Trace, // trace XPC_WN_Shared_Trace, // mark/trace
// ClassExtension // ClassExtension
{ {
@ -915,6 +915,7 @@ js::Class XPC_WN_NoHelper_JSClass = {
nsnull, // deleteProperty nsnull, // deleteProperty
JS_VALUEIFY(js::NewEnumerateOp, XPC_WN_JSOp_Enumerate), JS_VALUEIFY(js::NewEnumerateOp, XPC_WN_JSOp_Enumerate),
XPC_WN_JSOp_TypeOf_Object, XPC_WN_JSOp_TypeOf_Object,
nsnull, // trace
nsnull, // fix nsnull, // fix
XPC_WN_JSOp_ThisObject, XPC_WN_JSOp_ThisObject,
XPC_WN_JSOp_Clear XPC_WN_JSOp_Clear
@ -1811,7 +1812,7 @@ js::Class XPC_WN_ModsAllowed_NoCall_Proto_JSClass = {
nsnull, // construct; nsnull, // construct;
nsnull, // xdrObject; nsnull, // xdrObject;
nsnull, // hasInstance; nsnull, // hasInstance;
XPC_WN_Shared_Proto_Trace, // trace; XPC_WN_Shared_Proto_Trace, // mark/trace;
JS_NULL_CLASS_EXT, JS_NULL_CLASS_EXT,
XPC_WN_NoCall_ObjectOps XPC_WN_NoCall_ObjectOps

View File

@ -222,7 +222,7 @@ js::Class XPC_WN_NoHelper_Proto_JSClass = {
nsnull, // construct; nsnull, // construct;
nsnull, // xdrObject; nsnull, // xdrObject;
nsnull, // hasInstance; nsnull, // hasInstance;
nsnull, // trace; nsnull, // mark/trace;
JS_NULL_CLASS_EXT, JS_NULL_CLASS_EXT,
XPC_WN_NoCall_ObjectOps XPC_WN_NoCall_ObjectOps