зеркало из https://github.com/mozilla/pjs.git
Fixing bug 441923. Stop our SDK sample plugins from crashing on destruction. r+sr=jonas@sicking.cc
This commit is contained in:
Родитель
70265557e3
Коммит
0303df49d8
|
@ -95,8 +95,10 @@ nsPluginInstance::~nsPluginInstance()
|
|||
// so releasing it here does not guarantee that it is over
|
||||
// we should take precaution in case it will be called later
|
||||
// and zero its mPlugin member
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_IF_RELEASE(mScriptablePeer);
|
||||
if (mScriptablePeer) {
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_RELEASE(mScriptablePeer);
|
||||
}
|
||||
}
|
||||
|
||||
NPBool nsPluginInstance::init(NPWindow* aWindow)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
@ -126,8 +126,10 @@ nsPluginInstance::~nsPluginInstance()
|
|||
// so releasing it here does not guarantee that it is over
|
||||
// we should take precaution in case it will be called later
|
||||
// and zero its mPlugin member
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_IF_RELEASE(mScriptablePeer);
|
||||
if (mScriptablePeer) {
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_RELEASE(mScriptablePeer);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
@ -93,8 +93,10 @@ nsPluginInstance::~nsPluginInstance()
|
|||
// so releasing it here does not guarantee that it is over
|
||||
// we should take precaution in case it will be called later
|
||||
// and zero its mPlugin member
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_IF_RELEASE(mScriptablePeer);
|
||||
if (mScriptablePeer) {
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_RELEASE(mScriptablePeer);
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK PluginWinProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче