mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1322458 - Fix kungFuDeathGrip errors that clang plugin reports on Windows. r=aklotz,Ehsan
MozReview-Commit-ID: FLTLZSg2yh9 --HG-- extra : rebase_source : e8aad8f35cffb3312e043a4fcec6296371baf432
This commit is contained in:
parent
c2a23d7e57
commit
4f285bd583
@ -215,6 +215,7 @@ CompositorD3D9::SetRenderTarget(CompositingRenderTarget *aRenderTarget)
|
||||
{
|
||||
MOZ_ASSERT(aRenderTarget && mDeviceManager);
|
||||
RefPtr<CompositingRenderTargetD3D9> oldRT = mCurrentRT;
|
||||
Unused << oldRT;
|
||||
mCurrentRT = static_cast<CompositingRenderTargetD3D9*>(aRenderTarget);
|
||||
mCurrentRT->BindRenderTarget(device());
|
||||
PrepareViewport(mCurrentRT->GetSize());
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "MainThreadUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "mozilla/mscom/COMApartmentRegion.h"
|
||||
#include "mozilla/mscom/Utils.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@ -33,6 +34,7 @@ public:
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsIThread> thread = GetMTAThread();
|
||||
MOZ_ASSERT(thread);
|
||||
Unused << thread;
|
||||
}
|
||||
|
||||
template <typename FuncT>
|
||||
|
@ -40,7 +40,7 @@ WeakReferenceSupport::QueryInterface(REFIID riid, void** ppv)
|
||||
*ppv = nullptr;
|
||||
|
||||
// Raise the refcount for stabilization purposes during aggregation
|
||||
RefPtr<IUnknown> kungFuDeathGrip(static_cast<IUnknown*>(this));
|
||||
RefPtr<IUnknown> kungFuDeathGrip(this);
|
||||
|
||||
if (riid == IID_IUnknown || riid == IID_IWeakReferenceSource) {
|
||||
punk = static_cast<IUnknown*>(this);
|
||||
|
@ -1719,7 +1719,7 @@ TSFTextStore::FlushPendingActions()
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<nsWindowBase> kungFuDeathGrip(mWidget);
|
||||
RefPtr<nsWindowBase> widget(mWidget);
|
||||
nsresult rv = mDispatcher->BeginNativeInputTransaction();
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
MOZ_LOG(sTextStoreLog, LogLevel::Error,
|
||||
@ -1748,8 +1748,8 @@ TSFTextStore::FlushPendingActions()
|
||||
|
||||
if (action.mAdjustSelection) {
|
||||
// Select composition range so the new composition replaces the range
|
||||
WidgetSelectionEvent selectionSet(true, eSetSelection, mWidget);
|
||||
mWidget->InitEvent(selectionSet);
|
||||
WidgetSelectionEvent selectionSet(true, eSetSelection, widget);
|
||||
widget->InitEvent(selectionSet);
|
||||
selectionSet.mOffset = static_cast<uint32_t>(action.mSelectionStart);
|
||||
selectionSet.mLength = static_cast<uint32_t>(action.mSelectionLength);
|
||||
selectionSet.mReversed = false;
|
||||
@ -1770,7 +1770,7 @@ TSFTextStore::FlushPendingActions()
|
||||
MOZ_LOG(sTextStoreLog, LogLevel::Debug,
|
||||
("0x%p TSFTextStore::FlushPendingActions() "
|
||||
"dispatching compositionstart event...", this));
|
||||
WidgetEventTime eventTime = mWidget->CurrentMessageWidgetEventTime();
|
||||
WidgetEventTime eventTime = widget->CurrentMessageWidgetEventTime();
|
||||
nsEventStatus status;
|
||||
rv = mDispatcher->StartComposition(status, &eventTime);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -1781,7 +1781,7 @@ TSFTextStore::FlushPendingActions()
|
||||
this, GetBoolName(!IsComposingInContent())));
|
||||
mDeferClearingContentForTSF = !IsComposingInContent();
|
||||
}
|
||||
if (!mWidget || mWidget->Destroyed()) {
|
||||
if (!widget || widget->Destroyed()) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -1814,7 +1814,7 @@ TSFTextStore::FlushPendingActions()
|
||||
MOZ_LOG(sTextStoreLog, LogLevel::Debug,
|
||||
("0x%p TSFTextStore::FlushPendingActions() "
|
||||
"dispatching compositionchange event...", this));
|
||||
WidgetEventTime eventTime = mWidget->CurrentMessageWidgetEventTime();
|
||||
WidgetEventTime eventTime = widget->CurrentMessageWidgetEventTime();
|
||||
nsEventStatus status;
|
||||
rv = mDispatcher->FlushPendingComposition(status, &eventTime);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -1844,7 +1844,7 @@ TSFTextStore::FlushPendingActions()
|
||||
MOZ_LOG(sTextStoreLog, LogLevel::Debug,
|
||||
("0x%p TSFTextStore::FlushPendingActions(), "
|
||||
"dispatching compositioncommit event...", this));
|
||||
WidgetEventTime eventTime = mWidget->CurrentMessageWidgetEventTime();
|
||||
WidgetEventTime eventTime = widget->CurrentMessageWidgetEventTime();
|
||||
nsEventStatus status;
|
||||
rv = mDispatcher->CommitComposition(status, &action.mData, &eventTime);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -1875,8 +1875,8 @@ TSFTextStore::FlushPendingActions()
|
||||
break;
|
||||
}
|
||||
|
||||
WidgetSelectionEvent selectionSet(true, eSetSelection, mWidget);
|
||||
selectionSet.mOffset =
|
||||
WidgetSelectionEvent selectionSet(true, eSetSelection, widget);
|
||||
selectionSet.mOffset =
|
||||
static_cast<uint32_t>(action.mSelectionStart);
|
||||
selectionSet.mLength =
|
||||
static_cast<uint32_t>(action.mSelectionLength);
|
||||
@ -1887,7 +1887,7 @@ TSFTextStore::FlushPendingActions()
|
||||
MOZ_CRASH("unexpected action type");
|
||||
}
|
||||
|
||||
if (mWidget && !mWidget->Destroyed()) {
|
||||
if (widget && !widget->Destroyed()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user