Backed out changeset a1e877fa8d67 (bug 866450)

This commit is contained in:
Ed Morley 2013-05-02 11:57:07 +01:00
Родитель 3b749d7033
Коммит 06d8f73264
1 изменённых файлов: 7 добавлений и 7 удалений

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

@ -243,7 +243,7 @@ def CallOnUnforgeableHolder(descriptor, code, isXrayCheck=None):
JSObject* global = js::GetGlobalForObjectCrossCompartment(proxy);"""
return (pre + """
JS::Rooted<JSObject*> unforgeableHolder(cx, GetUnforgeableHolder(global, prototypes::id::%s));
JSObject* unforgeableHolder = GetUnforgeableHolder(global, prototypes::id::%s);
""" + CGIndenter(CGGeneric(code)).define() + """
}
""") % descriptor.name
@ -1204,7 +1204,7 @@ class CGClassHasInstanceHook(CGAbstractStaticMethod):
return true;
}
JS::Rooted<JSObject*> instance(cx, &vp.toObject());
JSObject* instance = &vp.toObject();
"""
if self.descriptor.interface.hasInterfacePrototypeObject():
return header + """
@ -2577,7 +2577,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
arrayRef = "${declName}"
# NOTE: Keep this in sync with variadic conversions as needed
templateBody = ("""JS::Rooted<JSObject*> seq(cx, &${val}.toObject());\n
templateBody = ("""JSObject* seq = &${val}.toObject();\n
if (!IsArrayLike(cx, seq)) {
%s
}
@ -2916,9 +2916,9 @@ for (uint32_t i = 0; i < length; ++i) {
else:
holderType = "nsRefPtr<" + typeName + ">"
templateBody += (
"JS::Rooted<JS::Value> tmpVal(cx, ${val});\n" +
"jsval tmpVal = ${val};\n" +
typePtr + " tmp;\n"
"if (NS_FAILED(xpc_qsUnwrapArg<" + typeName + ">(cx, ${val}, &tmp, static_cast<" + typeName + "**>(getter_AddRefs(${holderName})), tmpVal.address()))) {\n")
"if (NS_FAILED(xpc_qsUnwrapArg<" + typeName + ">(cx, ${val}, &tmp, static_cast<" + typeName + "**>(getter_AddRefs(${holderName})), &tmpVal))) {\n")
templateBody += CGIndenter(onFailureBadType(failureCode,
descriptor.interface.identifier.name)).define()
templateBody += ("}\n"
@ -6782,7 +6782,7 @@ class CGDOMJSProxyHandler_hasOwn(ClassMethod):
"Should not have a XrayWrapper here");
""" + indexed + unforgeable + """
JS::Rooted<JSObject*> expando(cx, GetExpandoObject(proxy));
JSObject* expando = GetExpandoObject(proxy);
if (expando) {
JSBool b = true;
JSBool ok = JS_HasPropertyById(cx, expando, id, &b);
@ -6818,7 +6818,7 @@ class CGDOMJSProxyHandler_get(ClassMethod):
hasUnforgeable)
else:
getUnforgeableOrExpando = ""
getUnforgeableOrExpando += """JS::Rooted<JSObject*> expando(cx, DOMProxyHandler::GetExpandoObject(proxy));
getUnforgeableOrExpando += """JSObject* expando = DOMProxyHandler::GetExpandoObject(proxy);
if (expando) {
JSBool hasProp;
if (!JS_HasPropertyById(cx, expando, id, &hasProp)) {