mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 865569 - Poison nsView. r=roc
This commit is contained in:
parent
aa60079743
commit
19ebf3187f
@ -9,13 +9,10 @@
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsPresArena.h"
|
||||
#include "nsXULPopupManager.h"
|
||||
#include "nsIWidgetListener.h"
|
||||
|
||||
@ -134,7 +131,16 @@ nsView* nsView::GetViewFor(nsIWidget* aWidget)
|
||||
|
||||
void nsView::Destroy()
|
||||
{
|
||||
delete this;
|
||||
this->~nsView();
|
||||
|
||||
const uintptr_t POISON = nsPresArena::GetPoisonValue();
|
||||
char* p = reinterpret_cast<char*>(this);
|
||||
char* limit = p + sizeof(*this);
|
||||
for (; p < limit; p += sizeof(uintptr_t)) {
|
||||
*reinterpret_cast<uintptr_t*>(p) = POISON;
|
||||
}
|
||||
|
||||
nsView::operator delete(this);
|
||||
}
|
||||
|
||||
void nsView::SetPosition(nscoord aX, nscoord aY)
|
||||
|
Loading…
Reference in New Issue
Block a user