зеркало из https://github.com/mozilla/pjs.git
Bug 564602 - provide Parent::GetSingleton() without force child process creation.r=jones.chris.g
This commit is contained in:
Родитель
a0d9f3b7c0
Коммит
e2f3d4b6f7
|
@ -60,12 +60,12 @@ namespace dom {
|
|||
ContentProcessParent* ContentProcessParent::gSingleton;
|
||||
|
||||
ContentProcessParent*
|
||||
ContentProcessParent::GetSingleton()
|
||||
ContentProcessParent::GetSingleton(PRBool aForceNew)
|
||||
{
|
||||
if (gSingleton && !gSingleton->IsAlive())
|
||||
gSingleton = nsnull;
|
||||
|
||||
if (!gSingleton) {
|
||||
if (!gSingleton && aForceNew) {
|
||||
nsRefPtr<ContentProcessParent> parent = new ContentProcessParent();
|
||||
if (parent) {
|
||||
nsCOMPtr<nsIObserverService> obs =
|
||||
|
|
|
@ -67,7 +67,7 @@ private:
|
|||
typedef mozilla::ipc::TestShellParent TestShellParent;
|
||||
|
||||
public:
|
||||
static ContentProcessParent* GetSingleton();
|
||||
static ContentProcessParent* GetSingleton(PRBool aForceNew = PR_TRUE);
|
||||
|
||||
#if 0
|
||||
// TODO: implement this somewhere!
|
||||
|
|
Загрузка…
Ссылка в новой задаче