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