зеркало из https://github.com/mozilla/pjs.git
Hold strong ref to ourselves so we don't die while touching members. Bug 421602 followup, r= and a= pending
This commit is contained in:
Родитель
6d3a0d05b3
Коммит
336fa49f2b
|
@ -500,6 +500,10 @@ void imgRequestProxy::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
|
||||||
GetName(name);
|
GetName(name);
|
||||||
LOG_FUNC_WITH_PARAM(gImgLog, "imgRequestProxy::OnStopRequest", "name", name.get());
|
LOG_FUNC_WITH_PARAM(gImgLog, "imgRequestProxy::OnStopRequest", "name", name.get());
|
||||||
#endif
|
#endif
|
||||||
|
// There's all sorts of stuff here that could kill us (the OnStopRequest call
|
||||||
|
// on the listener, the removal from the loadgroup, the release of the
|
||||||
|
// listener, etc). Don't let them do it.
|
||||||
|
nsCOMPtr<imgIRequest> kungFuDeathGrip(this);
|
||||||
|
|
||||||
if (mListener) {
|
if (mListener) {
|
||||||
// Hold a ref to the listener while we call it, just in case.
|
// Hold a ref to the listener while we call it, just in case.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче