зеркало из https://github.com/mozilla/gecko-dev.git
a=edburns
r=ashuk bugs: 44327, 44328 WindowControl: Don't call nativeDestroyInitContext NativeEventThread Call windowControl.nativeDestroyInitContext when the run() loop exits.
This commit is contained in:
Родитель
a0fde8c6c0
Коммит
056cc5fd98
|
@ -142,6 +142,15 @@ public void delete()
|
|||
synchronized(this) {
|
||||
// this has to be inside the synchronized block!
|
||||
browserControlCanvas = null;
|
||||
synchronized (this) {
|
||||
try {
|
||||
wait();
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.out.println("NativeEventThread.delete: interrupted while waiting\n\t for NativeEventThread to notify() after destruction of initContext: " + e +
|
||||
" " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
// PENDING(ashuk): do any necessary cleanup.
|
||||
listenersToAdd = null;
|
||||
|
@ -199,6 +208,15 @@ public void run()
|
|||
|
||||
// this has to be inside the synchronized block!
|
||||
if (null == this.browserControlCanvas) {
|
||||
// if we get here, this Thread is terminating, destroy
|
||||
// the initContext and notify the WindowControl
|
||||
((WindowControlImpl)windowControl).nativeDestroyInitContext(nativeWebShell);
|
||||
try {
|
||||
notify();
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.out.println("NativeEventThread.run: Exception: trying to send notify() to this during delete: " + e + " " + e.getMessage());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public WindowControlImpl(WrapperFactory yourFactory,
|
|||
/**
|
||||
|
||||
* First, we delete our eventThread, which causes the eventThread to
|
||||
* stop running. Then we call nativeDestroyInitContext(), which
|
||||
* stop running, which causes the initContext to be deleted.
|
||||
* deallocates native resources for this window.
|
||||
|
||||
*/
|
||||
|
@ -75,7 +75,6 @@ public void delete()
|
|||
Assert.assert(null != eventThread, "eventThread shouldn't be null at delete time");
|
||||
eventThread.delete();
|
||||
eventThread = null;
|
||||
nativeDestroyInitContext(nativeWebShell);
|
||||
nativeWebShell = -1;
|
||||
}
|
||||
|
||||
|
@ -243,7 +242,7 @@ public static void main(String [] args)
|
|||
|
||||
Log.setApplicationName("WindowControlImpl");
|
||||
Log.setApplicationVersion("0.0");
|
||||
Log.setApplicationVersionDate("$Id: WindowControlImpl.java,v 1.4 2000/03/13 18:42:31 edburns%acm.org Exp $");
|
||||
Log.setApplicationVersionDate("$Id: WindowControlImpl.java,v 1.5 2000/07/07 18:49:08 edburns%acm.org Exp $");
|
||||
|
||||
try {
|
||||
org.mozilla.webclient.BrowserControlFactory.setAppData(args[0]);
|
||||
|
|
Загрузка…
Ссылка в новой задаче