Bug 1389581 part 2. Remove the now-unused getComponentsForScope API. r=kmag

This commit is contained in:
Boris Zbarsky 2018-03-28 22:46:23 -04:00
Родитель 50af44ded2
Коммит 448fab1f17
2 изменённых файлов: 0 добавлений и 26 удалений

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

@ -483,15 +483,6 @@ interface nsIXPCComponents_Utils : nsISupports
[implicit_jscontext]
void forcePermissiveCOWs();
/*
* This seemingly-paradoxical API allows privileged code to explicitly give
* unprivileged code a reference to its own Components object (whereas it's
* normally hidden away on a scope chain visible only to XBL methods). See
* also SpecialPowers.getComponents.
*/
[implicit_jscontext]
jsval getComponentsForScope(in jsval vscope);
/*
* Dispatches a runnable to the current/main thread. If |scope| is passed,
* the runnable will be dispatch in the compartment of |scope|, which

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

@ -2677,23 +2677,6 @@ nsXPCComponents_Utils::ForcePermissiveCOWs(JSContext* cx)
return NS_OK;
}
NS_IMETHODIMP
nsXPCComponents_Utils::GetComponentsForScope(HandleValue vscope, JSContext* cx,
MutableHandleValue rval)
{
if (!vscope.isObject())
return NS_ERROR_INVALID_ARG;
JSObject* scopeObj = js::UncheckedUnwrap(&vscope.toObject());
XPCWrappedNativeScope* scope = ObjectScope(scopeObj);
RootedObject components(cx);
if (!scope->GetComponentsJSObject(&components))
return NS_ERROR_FAILURE;
if (!JS_WrapObject(cx, &components))
return NS_ERROR_FAILURE;
rval.setObject(*components);
return NS_OK;
}
NS_IMETHODIMP
nsXPCComponents_Utils::Dispatch(HandleValue runnableArg, HandleValue scope,
JSContext* cx)