Bug 1137334. Remove nsIDOMWindowUtils.getParent. r=bholley. We still have a CLOSED TREE, sadly.

This commit is contained in:
Boris Zbarsky 2015-02-26 15:58:59 -05:00
parent 111d75dbac
commit db8c6eb30d
3 changed files with 1 additions and 38 deletions

View File

@ -2379,31 +2379,6 @@ nsDOMWindowUtils::IsInModalState(bool *retval)
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::GetParent(JS::Handle<JS::Value> aObject,
JSContext* aCx,
JS::MutableHandle<JS::Value> aParent)
{
MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
// First argument must be an object.
if (aObject.isPrimitive()) {
return NS_ERROR_XPC_BAD_CONVERT_JS;
}
JS::Rooted<JSObject*> parent(aCx, JS_GetParent(&aObject.toObject()));
// Outerize if necessary.
if (parent) {
if (js::ObjectOp outerize = js::GetObjectClass(parent)->ext.outerObject) {
parent = outerize(aCx, parent);
}
}
aParent.setObject(*parent);
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::GetOuterWindowID(uint64_t *aWindowID)
{

View File

@ -50,7 +50,7 @@ interface nsITranslationNodeList;
interface nsIJSRAIIHelper;
interface nsIContentPermissionRequest;
[scriptable, uuid(d0461871-31bd-4da1-b22d-24595c27295c)]
[scriptable, uuid(6eaf87a1-b252-4c4e-a2fc-318120680335)]
interface nsIDOMWindowUtils : nsISupports {
/**
@ -1247,14 +1247,6 @@ interface nsIDOMWindowUtils : nsISupports {
in AString aPseudoElement,
in AString aPropertyName);
/**
* Returns the parent of obj.
*
* @param obj The JavaScript object whose parent is to be gotten.
* @return the parent.
*/
[implicit_jscontext] jsval getParent(in jsval obj);
/**
* Get the id of the outer window of this window. This will never throw.
*/

View File

@ -6,10 +6,6 @@
var utils = SpecialPowers.DOMWindowUtils;
ok(utils.getClassName(wrapper) === expected, note);
}
function check_parent(ok, obj, expected, note) {
var utils = SpecialPowers.DOMWindowUtils;
ok(utils.getParent(obj) === expected, note);
}
function run_test(ok, xpcnw, sjow) {
// both wrappers should point to our window: XOW
check_wrapper(ok, ok, "Proxy", "functions are wrapped properly")