Bug 584305 Define no extern "C" version ObjectOps to fix build issue with Solaris Studio r=brendan

This commit is contained in:
Ginn Chen 2010-09-28 17:59:25 +08:00
parent 1b78aa968a
commit 5b67866f99
4 changed files with 30 additions and 17 deletions

View File

@ -195,7 +195,7 @@ MarkChildren(JSTracer *trc, JSObject *obj)
obj->emptyShape->trace(trc);
/* Delegate to ops or the native marking op. */
JSTraceOp op = obj->getOps()->trace;
TraceOp op = obj->getOps()->trace;
(op ? op : js_TraceObject)(trc, obj);
}
@ -210,7 +210,7 @@ MarkChildren(JSTracer *trc, JSFunction *fun)
if (JSObject *parent = obj->getParent())
MarkObject(trc, *parent, "parent");
JSTraceOp op = obj->getOps()->trace;
TraceOp op = obj->getOps()->trace;
(op ? op : js_TraceObject)(trc, obj);
}

View File

@ -1389,7 +1389,7 @@ obj_hasOwnProperty(JSContext *cx, uintN argc, Value *vp)
}
JSBool
js_HasOwnPropertyHelper(JSContext *cx, JSLookupPropOp lookup, uintN argc,
js_HasOwnPropertyHelper(JSContext *cx, LookupPropOp lookup, uintN argc,
Value *vp)
{
jsid id;
@ -1420,7 +1420,7 @@ js_HasOwnPropertyHelper(JSContext *cx, JSLookupPropOp lookup, uintN argc,
}
JSBool
js_HasOwnProperty(JSContext *cx, JSLookupPropOp lookup, JSObject *obj, jsid id,
js_HasOwnProperty(JSContext *cx, LookupPropOp lookup, JSObject *obj, jsid id,
JSObject **objp, JSProperty **propp)
{
JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED | JSRESOLVE_DETECTING);

View File

@ -1056,7 +1056,7 @@ struct JSObject : js::gc::Cell {
void clear(JSContext *cx);
JSBool lookupProperty(JSContext *cx, jsid id, JSObject **objp, JSProperty **propp) {
JSLookupPropOp op = getOps()->lookupProperty;
js::LookupPropOp op = getOps()->lookupProperty;
return (op ? op : js_LookupProperty)(cx, this, id, objp, propp);
}
@ -1079,12 +1079,12 @@ struct JSObject : js::gc::Cell {
}
JSBool getAttributes(JSContext *cx, jsid id, uintN *attrsp) {
JSAttributesOp op = getOps()->getAttributes;
js::AttributesOp op = getOps()->getAttributes;
return (op ? op : js_GetAttributes)(cx, this, id, attrsp);
}
JSBool setAttributes(JSContext *cx, jsid id, uintN *attrsp) {
JSAttributesOp op = getOps()->setAttributes;
js::AttributesOp op = getOps()->setAttributes;
return (op ? op : js_SetAttributes)(cx, this, id, attrsp);
}
@ -1099,7 +1099,7 @@ struct JSObject : js::gc::Cell {
}
JSType typeOf(JSContext *cx) {
JSTypeOfOp op = getOps()->typeOf;
js::TypeOfOp op = getOps()->typeOf;
return (op ? op : js_TypeOf)(cx, this);
}
@ -1335,11 +1335,11 @@ extern void
js_TraceSharpMap(JSTracer *trc, JSSharpObjectMap *map);
extern JSBool
js_HasOwnPropertyHelper(JSContext *cx, JSLookupPropOp lookup, uintN argc,
js_HasOwnPropertyHelper(JSContext *cx, js::LookupPropOp lookup, uintN argc,
js::Value *vp);
extern JSBool
js_HasOwnProperty(JSContext *cx, JSLookupPropOp lookup, JSObject *obj, jsid id,
js_HasOwnProperty(JSContext *cx, js::LookupPropOp lookup, JSObject *obj, jsid id,
JSObject **objp, JSProperty **propp);
extern JSBool

View File

@ -881,6 +881,19 @@ typedef JSBool
(* StrictPropertyIdOp)(JSContext *cx, JSObject *obj, jsid id, Value *vp, JSBool strict);
typedef JSBool
(* CallOp)(JSContext *cx, uintN argc, Value *vp);
typedef JSBool
(* LookupPropOp)(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
JSProperty **propp);
typedef JSBool
(* AttributesOp)(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp);
typedef JSType
(* TypeOfOp)(JSContext *cx, JSObject *obj);
typedef void
(* TraceOp)(JSTracer *trc, JSObject *obj);
typedef JSObject *
(* ObjectOp)(JSContext *cx, JSObject *obj);
typedef void
(* FinalizeOp)(JSContext *cx, JSObject *obj);
class AutoIdVector;
@ -959,19 +972,19 @@ struct ClassExtension {
#define JS_NULL_CLASS_EXT {NULL,NULL,NULL,NULL,NULL}
struct ObjectOps {
JSLookupPropOp lookupProperty;
js::LookupPropOp lookupProperty;
js::DefinePropOp defineProperty;
js::PropertyIdOp getProperty;
js::StrictPropertyIdOp setProperty;
JSAttributesOp getAttributes;
JSAttributesOp setAttributes;
js::AttributesOp getAttributes;
js::AttributesOp setAttributes;
js::StrictPropertyIdOp deleteProperty;
js::NewEnumerateOp enumerate;
JSTypeOfOp typeOf;
JSTraceOp trace;
js::TypeOfOp typeOf;
js::TraceOp trace;
js::FixOp fix;
JSObjectOp thisObject;
JSFinalizeOp clear;
js::ObjectOp thisObject;
js::FinalizeOp clear;
};
#define JS_NULL_OBJECT_OPS {NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL}