зеркало из https://github.com/mozilla/pjs.git
backing out bug 427185 to investigate tinderbox orange
This commit is contained in:
Родитель
248bcdd278
Коммит
3dc3b3b225
|
@ -622,9 +622,6 @@ JS_STATIC_ASSERT(sizeof(JSTempValueUnion) == sizeof(void *));
|
|||
#define JS_PUSH_TEMP_ROOT_QNAME(cx,qn,tvr) \
|
||||
JS_PUSH_TEMP_ROOT_COMMON(cx, qn, tvr, JSTVU_SINGLE, qname)
|
||||
|
||||
#define JS_PUSH_TEMP_ROOT_NAMESPACE(cx,ns,tvr) \
|
||||
JS_PUSH_TEMP_ROOT_COMMON(cx, ns, tvr, JSTVU_SINGLE, nspace)
|
||||
|
||||
#define JS_PUSH_TEMP_ROOT_XML(cx,xml_,tvr) \
|
||||
JS_PUSH_TEMP_ROOT_COMMON(cx, xml_, tvr, JSTVU_SINGLE, xml)
|
||||
|
||||
|
|
|
@ -1976,12 +1976,17 @@ JSObject *
|
|||
js_InitFunctionClass(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
JSObject *proto;
|
||||
JSAtom *atom;
|
||||
JSFunction *fun;
|
||||
|
||||
proto = JS_InitClass(cx, obj, NULL, &js_FunctionClass, Function, 1,
|
||||
function_props, function_methods, NULL, NULL);
|
||||
if (!proto)
|
||||
return NULL;
|
||||
atom = js_Atomize(cx, js_FunctionClass.name, strlen(js_FunctionClass.name),
|
||||
0);
|
||||
if (!atom)
|
||||
goto bad;
|
||||
fun = js_NewFunction(cx, proto, NULL, 0, JSFUN_INTERPRETED, obj, NULL);
|
||||
if (!fun)
|
||||
goto bad;
|
||||
|
|
|
@ -239,7 +239,6 @@ typedef union JSTempValueUnion {
|
|||
JSString *string;
|
||||
JSXML *xml;
|
||||
JSXMLQName *qname;
|
||||
JSXMLNamespace *nspace;
|
||||
JSTempValueTrace trace;
|
||||
JSScopeProperty *sprop;
|
||||
JSWeakRoots *weakRoots;
|
||||
|
|
|
@ -314,17 +314,11 @@ js_NewXMLNamespaceObject(JSContext *cx, JSString *prefix, JSString *uri,
|
|||
JSBool declared)
|
||||
{
|
||||
JSXMLNamespace *ns;
|
||||
JSTempValueRooter tvr;
|
||||
JSObject *obj;
|
||||
|
||||
ns = js_NewXMLNamespace(cx, prefix, uri, declared);
|
||||
if (!ns)
|
||||
return NULL;
|
||||
|
||||
JS_PUSH_TEMP_ROOT_NAMESPACE(cx, ns, &tvr);
|
||||
obj = js_GetXMLNamespaceObject(cx, ns);
|
||||
JS_POP_TEMP_ROOT(cx, &tvr);
|
||||
return obj;
|
||||
return js_GetXMLNamespaceObject(cx, ns);
|
||||
}
|
||||
|
||||
JSObject *
|
||||
|
@ -596,16 +590,11 @@ js_NewXMLQNameObject(JSContext *cx, JSString *uri, JSString *prefix,
|
|||
JSString *localName)
|
||||
{
|
||||
JSXMLQName *qn;
|
||||
JSTempValueRooter tvr;
|
||||
JSObject *obj;
|
||||
|
||||
qn = js_NewXMLQName(cx, uri, prefix, localName);
|
||||
if (!qn)
|
||||
return NULL;
|
||||
JS_PUSH_TEMP_ROOT_QNAME(cx, qn, &tvr);
|
||||
obj = js_GetXMLQNameObject(cx, qn);
|
||||
JS_POP_TEMP_ROOT(cx, &tvr);
|
||||
return obj;
|
||||
return js_GetXMLQNameObject(cx, qn);
|
||||
}
|
||||
|
||||
JSObject *
|
||||
|
@ -7766,6 +7755,9 @@ js_GetFunctionNamespace(JSContext *cx, jsval *vp)
|
|||
obj = rt->functionNamespaceObject;
|
||||
if (!obj) {
|
||||
JS_UNLOCK_GC(rt);
|
||||
atom = js_Atomize(cx, js_function_str, 8, 0);
|
||||
JS_ASSERT(atom);
|
||||
prefix = ATOM_TO_STRING(atom);
|
||||
|
||||
/*
|
||||
* Note that any race to atomize anti_uri here is resolved by
|
||||
|
@ -7779,7 +7771,6 @@ js_GetFunctionNamespace(JSContext *cx, jsval *vp)
|
|||
return JS_FALSE;
|
||||
rt->atomState.lazy.functionNamespaceURIAtom = atom;
|
||||
|
||||
prefix = ATOM_TO_STRING(rt->atomState.typeAtoms[JSTYPE_FUNCTION]);
|
||||
uri = ATOM_TO_STRING(atom);
|
||||
obj = js_NewXMLNamespaceObject(cx, prefix, uri, JS_FALSE);
|
||||
if (!obj)
|
||||
|
|
Загрузка…
Ссылка в новой задаче