Warning fixes (630865, r=jorendorff).

This commit is contained in:
Brendan Eich 2011-02-15 12:07:23 -08:00
Родитель 0a293a004e
Коммит ef184bb8e6
2 изменённых файлов: 4 добавлений и 1 удалений

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

@ -1707,9 +1707,11 @@ fun_enumerate(JSContext *cx, JSObject *obj)
static JSObject *
ResolveInterpretedFunctionPrototype(JSContext *cx, JSObject *obj)
{
#ifdef DEBUG
JSFunction *fun = obj->getFunctionPrivate();
JS_ASSERT(fun->isInterpreted());
JS_ASSERT(!fun->isFunctionPrototype());
#endif
/*
* Assert that fun is not a compiler-created function object, which
@ -2645,10 +2647,12 @@ IsBuiltinFunctionConstructor(JSFunction *fun)
const Shape *
LookupInterpretedFunctionPrototype(JSContext *cx, JSObject *funobj)
{
#ifdef DEBUG
JSFunction *fun = funobj->getFunctionPrivate();
JS_ASSERT(fun->isInterpreted());
JS_ASSERT(!fun->isFunctionPrototype());
JS_ASSERT(!funobj->isBoundFunction());
#endif
jsid id = ATOM_TO_JSID(cx->runtime->atomState.classPrototypeAtom);
const Shape *shape = funobj->nativeLookup(id);

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

@ -13740,7 +13740,6 @@ TraceRecorder::createThis(JSObject& ctor, LIns* ctor_ins, LIns** thisobj_insp)
// Given the above conditions, ctor.prototype is a non-configurable data
// property with a slot.
jsid id = ATOM_TO_JSID(cx->runtime->atomState.classPrototypeAtom);
const Shape *shape = LookupInterpretedFunctionPrototype(cx, &ctor);
if (!shape)
RETURN_ERROR("new f: error resolving f.prototype");