Bug 1552597, part 1 - Fix comments in RemapWrapper to say rewrap instead of wrap. r=jonco

These calls were changed from wrap() to rewrap() in bug 1291001.

Also, fix a minor typo in xpcprivate.h, because I didn't feel like
filing a separate bug for it.

Differential Revision: https://phabricator.services.mozilla.com/D31688

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew McCreight 2019-05-20 08:37:49 +00:00
Родитель 9f8b339328
Коммит 2184a00342
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -573,7 +573,7 @@ void js::RemapWrapper(JSContext* cx, JSObject* wobjArg,
Realm* wrealm = wobj->nonCCWRealm();
// First, we wrap it in the new compartment. We try to use the existing
// wrapper, |wobj|, since it's been nuked anyway. The wrap() function has
// wrapper, |wobj|, since it's been nuked anyway. The rewrap() function has
// the choice to reuse |wobj| or not.
RootedObject tobj(cx, newTarget);
AutoRealmUnchecked ar(cx, wrealm);
@ -582,7 +582,7 @@ void js::RemapWrapper(JSContext* cx, JSObject* wobjArg,
oomUnsafe.crash("js::RemapWrapper");
}
// If wrap() reused |wobj|, it will have overwritten it and returned with
// If rewrap() reused |wobj|, it will have overwritten it and returned with
// |tobj == wobj|. Otherwise, |tobj| will point to a new wrapper and |wobj|
// will still be nuked. In the latter case, we replace |wobj| with the
// contents of the new wrapper in |tobj|.
@ -593,7 +593,7 @@ void js::RemapWrapper(JSContext* cx, JSObject* wobjArg,
JSObject::swap(cx, wobj, tobj);
}
// Before swapping, this wrapper came out of wrap(), which enforces the
// Before swapping, this wrapper came out of rewrap(), which enforces the
// invariant that the wrapper in the map points directly to the key.
MOZ_ASSERT(Wrapper::wrappedObject(wobj) == newTarget);

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

@ -2727,7 +2727,7 @@ class CompartmentPrivate {
private:
JSObject2WrappedJSMap* mWrappedJSMap;
// Cache holding proxy objects for Window objects (and their Location oject)
// Cache holding proxy objects for Window objects (and their Location object)
// that are loaded in a different process.
RemoteProxyMap mRemoteProxies;