зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1465728 part 3 - Rename Cu.getCompartmentLocation to Cu.getRealmLocation. r=bz
This commit is contained in:
Родитель
3d013f2eef
Коммит
7f38cbf185
|
@ -184,7 +184,7 @@ function compartment_test(finish)
|
|||
function is(a, b, msg) { results.push({ result: a === b ? "PASS" : "FAIL", message: msg }) };
|
||||
function ok(x, msg) { results.push({ result: x ? "PASS" : "FAIL", message: msg }) };
|
||||
|
||||
let cpowLocation = Cu.getCompartmentLocation(obj);
|
||||
let cpowLocation = Cu.getRealmLocation(obj);
|
||||
ok(/Privileged Junk/.test(cpowLocation),
|
||||
"child->parent CPOWs should live in the privileged junk scope: " + cpowLocation);
|
||||
is(obj(), 42, "child->parent CPOW is invokable");
|
||||
|
|
|
@ -301,7 +301,7 @@
|
|||
is(Cu.getGlobalForObject(getUnprivilegedObject),
|
||||
Cu.getGlobalForObject(unprivilegedObject),
|
||||
"all parent->child CPOWs should live in the same scope");
|
||||
let cpowLocation = Cu.getCompartmentLocation(getUnprivilegedObject);
|
||||
let cpowLocation = Cu.getRealmLocation(getUnprivilegedObject);
|
||||
ok(/Privileged Junk/.test(cpowLocation),
|
||||
"parent->child CPOWs should live in the privileged junk scope: " + cpowLocation);
|
||||
|
||||
|
|
|
@ -651,7 +651,7 @@ interface nsIXPCComponents_Utils : nsISupports
|
|||
|
||||
/*
|
||||
* Gets the URI or identifier string associated with an object's
|
||||
* compartment (the same one used by the memory reporter machinery).
|
||||
* realm (the same one used by the memory reporter machinery).
|
||||
*
|
||||
* Unwraps cross-compartment wrappers first.
|
||||
*
|
||||
|
@ -659,7 +659,7 @@ interface nsIXPCComponents_Utils : nsISupports
|
|||
* this from addon code.
|
||||
*/
|
||||
[implicit_jscontext]
|
||||
ACString getCompartmentLocation(in jsval obj);
|
||||
ACString getRealmLocation(in jsval obj);
|
||||
|
||||
/*
|
||||
* Return a fractional number of milliseconds from process
|
||||
|
|
|
@ -3011,9 +3011,9 @@ nsXPCComponents_Utils::GetObjectPrincipal(HandleValue val, JSContext* cx,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXPCComponents_Utils::GetCompartmentLocation(HandleValue val,
|
||||
JSContext* cx,
|
||||
nsACString& result)
|
||||
nsXPCComponents_Utils::GetRealmLocation(HandleValue val,
|
||||
JSContext* cx,
|
||||
nsACString& result)
|
||||
{
|
||||
if (!val.isObject())
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
|
Загрузка…
Ссылка в новой задаче