зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1127066 - Complain loudly if APZEventState is used with a widget that doesn't support weak references. r=kats
--HG-- extra : source : e4337bd21059a0ecbffa5d0d567dd9a8f0a3bcd1
This commit is contained in:
Родитель
c83b7760e1
Коммит
933c29e8b5
|
@ -25,7 +25,7 @@ static bool sActiveDurationMsSet = false;
|
|||
|
||||
APZEventState::APZEventState(nsIWidget* aWidget,
|
||||
const nsRefPtr<ContentReceivedInputBlockCallback>& aCallback)
|
||||
: mWidget(do_GetWeakReference(aWidget))
|
||||
: mWidget(nullptr) // initialized in constructor body
|
||||
, mActiveElementManager(new ActiveElementManager())
|
||||
, mContentReceivedInputBlockCallback(aCallback)
|
||||
, mPendingTouchPreventedResponse(false)
|
||||
|
@ -33,6 +33,11 @@ APZEventState::APZEventState(nsIWidget* aWidget,
|
|||
, mEndTouchIsClick(false)
|
||||
, mTouchEndCancelled(false)
|
||||
{
|
||||
nsresult rv;
|
||||
mWidget = do_GetWeakReference(aWidget, &rv);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv), "APZEventState constructed with a widget that"
|
||||
" does not support weak references. APZ will NOT work!");
|
||||
|
||||
if (!sActiveDurationMsSet) {
|
||||
Preferences::AddIntVarCache(&sActiveDurationMs,
|
||||
"ui.touch_activation.duration_ms",
|
||||
|
|
Загрузка…
Ссылка в новой задаче