Make nsBaseAppShell::mRunWasCalled accessible to subclasses. Fixes mac bustage.
git-svn-id: svn://10.0.0.236/trunk@196260 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
506ad714d2
commit
08efbf2eba
@ -152,7 +152,7 @@ nsAppShell::Init()
|
||||
void
|
||||
nsAppShell::ProcessGeckoEvents()
|
||||
{
|
||||
if (mRunWasCalled) {
|
||||
if (RunWasCalled()) {
|
||||
// We own the run loop. Interrupt it. It will be started again later
|
||||
// (unless exiting) by nsBaseAppShell. Trust me, I'm a doctor.
|
||||
[NSApp stop:nil];
|
||||
|
||||
@ -212,7 +212,7 @@ nsAppShell::ProcessGeckoEvents(void* aInfo)
|
||||
{
|
||||
nsAppShell* self = NS_STATIC_CAST(nsAppShell*, aInfo);
|
||||
|
||||
if (self->mRunWasCalled) {
|
||||
if (self->RunWasCalled()) {
|
||||
// We own the run loop. Interrupt it. It will be started again later
|
||||
// (unless exiting) by nsBaseAppShell. Trust me, I'm a doctor.
|
||||
::QuitApplicationEventLoop();
|
||||
|
||||
@ -91,6 +91,14 @@ protected:
|
||||
*/
|
||||
virtual PRBool ProcessNextNativeEvent(PRBool mayWait) = 0;
|
||||
|
||||
/**
|
||||
* Indicates whether or not nsIAppShell::Run was called. In an embedding
|
||||
* application, the embedder usually spins up a native event loop on their
|
||||
* own and does not call nsIAppShell::Run. In such cases, we have to go to
|
||||
* extra lengths to properly hook ourselves into that native event loop.
|
||||
*/
|
||||
PRBool RunWasCalled() { return mRunWasCalled; }
|
||||
|
||||
private:
|
||||
PRBool DoProcessNextNativeEvent(PRBool mayWait);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user