Bug 809532 - rm unused CloneFunctionObject overload (r=billm)

--HG--
extra : rebase_source : 9c495cef6839782ec7bfa9d1cc214c282ddaa591
This commit is contained in:
Luke Wagner 2012-11-07 13:28:52 -08:00
Родитель 859535ebaf
Коммит fccdbc569c
1 изменённых файлов: 0 добавлений и 20 удалений

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

@ -257,26 +257,6 @@ CloneFunctionObjectIfNotSingleton(JSContext *cx, HandleFunction fun, HandleObjec
return CloneFunctionObject(cx, fun, parent);
}
inline JSFunction *
CloneFunctionObject(JSContext *cx, HandleFunction fun)
{
/*
* Variant which makes an exact clone of fun, preserving parent and proto.
* Calling the above version CloneFunctionObject(cx, fun, fun->getParent())
* is not equivalent: API clients, including XPConnect, can reparent
* objects so that fun->global() != fun->getProto()->global().
* See ReparentWrapperIfFound.
*/
JS_ASSERT(fun->getParent() && fun->getProto());
if (fun->hasSingletonType())
return fun;
Rooted<JSObject*> env(cx, fun->environment());
Rooted<JSObject*> proto(cx, fun->getProto());
return js_CloneFunctionObject(cx, fun, env, proto, JSFunction::ExtendedFinalizeKind);
}
} /* namespace js */
inline void