Fix a compiler warning that occurs when jsgcinlines.h is included before jsobjinlines.h. r=warning-patrol

This commit is contained in:
Jeff Walden 2011-03-25 17:23:05 -07:00
Родитель 84e0aaa0aa
Коммит b2775a71f0
2 изменённых файлов: 31 добавлений и 25 удалений

Просмотреть файл

@ -347,6 +347,37 @@ MarkShape(JSTracer *trc, const Shape *shape, const char *name)
Mark(trc, shape);
}
} // namespace gc
} // namespace js
inline void
JSObject::trace(JSTracer *trc)
{
if (!isNative())
return;
JSContext *cx = trc->context;
js::Shape *shape = lastProp;
MarkShape(trc, shape, "shape");
if (IS_GC_MARKING_TRACER(trc) && cx->runtime->gcRegenShapes) {
/*
* MarkShape will regenerate the shape if need be. However, we need to
* regenerate our shape if hasOwnShape() is true.
*/
uint32 newShape = shape->shape;
if (hasOwnShape()) {
newShape = js_RegenerateShapeForGC(cx->runtime);
JS_ASSERT(newShape != shape->shape);
}
objShape = newShape;
}
}
namespace js {
namespace gc {
void
MarkObjectSlots(JSTracer *trc, JSObject *obj);

Просмотреть файл

@ -125,31 +125,6 @@ JSObject::syncSpecialEquality()
flags |= JSObject::HAS_EQUALITY;
}
inline void
JSObject::trace(JSTracer *trc)
{
if (!isNative())
return;
JSContext *cx = trc->context;
js::Shape *shape = lastProp;
MarkShape(trc, shape, "shape");
if (IS_GC_MARKING_TRACER(trc) && cx->runtime->gcRegenShapes) {
/*
* MarkShape will regenerate the shape if need be. However, we need to
* regenerate our shape if hasOwnShape() is true.
*/
uint32 newShape = shape->shape;
if (hasOwnShape()) {
newShape = js_RegenerateShapeForGC(cx->runtime);
JS_ASSERT(newShape != shape->shape);
}
objShape = newShape;
}
}
inline void
JSObject::finalize(JSContext *cx)
{