mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 777546 - Root the minimum XML stuff necessary to pass jstests
--HG-- extra : rebase_source : 531766441ca042d9588e68a479fb402ad8c399be
This commit is contained in:
parent
40cc44ab0e
commit
49d155b6fc
@ -7310,8 +7310,9 @@ NewXMLObject(JSContext *cx, JSXML *xml)
|
||||
}
|
||||
|
||||
JSObject *
|
||||
js_GetXMLObject(JSContext *cx, JSXML *xml)
|
||||
js_GetXMLObject(JSContext *cx, JSXML *xmlArg)
|
||||
{
|
||||
Rooted<JSXML*> xml(cx, xmlArg);
|
||||
JSObject *obj;
|
||||
|
||||
obj = xml->object;
|
||||
@ -7399,12 +7400,12 @@ js_InitXMLClass(JSContext *cx, JSObject *obj)
|
||||
cx->runtime->gcExactScanningEnabled = false;
|
||||
|
||||
JS_ASSERT(obj->isNative());
|
||||
GlobalObject *global = &obj->asGlobal();
|
||||
Rooted<GlobalObject*> global(cx, &obj->asGlobal());
|
||||
|
||||
JSObject *xmlProto = global->createBlankPrototype(cx, &XMLClass);
|
||||
RootedObject xmlProto(cx, global->createBlankPrototype(cx, &XMLClass));
|
||||
if (!xmlProto)
|
||||
return NULL;
|
||||
JSXML *xml = js_NewXML(cx, JSXML_CLASS_TEXT);
|
||||
Rooted<JSXML*> xml(cx, js_NewXML(cx, JSXML_CLASS_TEXT));
|
||||
if (!xml)
|
||||
return NULL;
|
||||
xmlProto->setPrivate(xml);
|
||||
@ -7449,7 +7450,7 @@ js_InitXMLClass(JSContext *cx, JSObject *obj)
|
||||
return NULL;
|
||||
|
||||
/* Define the isXMLName function. */
|
||||
if (!JS_DefineFunction(cx, obj, js_isXMLName_str, xml_isXMLName, 1, 0))
|
||||
if (!JS_DefineFunction(cx, global, js_isXMLName_str, xml_isXMLName, 1, 0))
|
||||
return NULL;
|
||||
|
||||
return xmlProto;
|
||||
|
@ -177,6 +177,8 @@ struct JSXML : js::gc::Cell {
|
||||
|
||||
static void writeBarrierPre(JSXML *xml);
|
||||
static void writeBarrierPost(JSXML *xml, void *addr);
|
||||
|
||||
static inline js::ThingRootKind rootKind() { return js::THING_ROOT_XML; }
|
||||
};
|
||||
|
||||
/* xml_flags values */
|
||||
|
Loading…
Reference in New Issue
Block a user