зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1157059 - Avoid calling AddRef on the pointer enclosed in an nsCOMPtr in nsBindingManager::DoProcessAttachedQueue(); r=baku
This commit is contained in:
Родитель
fcfd672bba
Коммит
b2f6baa64d
|
@ -50,6 +50,7 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/dom/NodeListBinding.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
@ -405,7 +406,9 @@ nsBindingManager::DoProcessAttachedQueue()
|
|||
}
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
NS_ADDREF_THIS();
|
||||
NS_ADDREF(timer);
|
||||
// We drop our reference to the timer here, since the timer callback is
|
||||
// responsible for releasing the object.
|
||||
unused << timer.forget().take();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче