зеркало из https://github.com/mozilla/gecko-dev.git
Followup change for bug 307289. Adding comment per jband's suggestion, and a warning to catch callers that restore the current prototype.
This commit is contained in:
Родитель
cbb887f552
Коммит
07ba15436d
|
@ -1049,6 +1049,12 @@ nsXPConnect::RestoreWrappedNativePrototype(JSContext * aJSContext,
|
|||
// entry for aClassInfo in the map we have to remove it to
|
||||
// be able to add the new one.
|
||||
map->Remove(aClassInfo);
|
||||
|
||||
// This code should do the right thing even if we're
|
||||
// restoring the current proto, but warn in that case
|
||||
// since doing that is pointless.
|
||||
NS_WARN_IF_FALSE(proto != oldProto,
|
||||
"Restoring current prototype, fix caller!");
|
||||
}
|
||||
|
||||
map->Add(aClassInfo, proto);
|
||||
|
|
Загрузка…
Ссылка в новой задаче