r=ashuk
The following files are in the fix for this bug:
M CBrowserContainer.cpp
M CurrentPageImpl.cpp
M HistoryImpl.cpp
M NavigationImpl.cpp
Here is the reason for the bug:
User presses "Refresh" button. This causes the following code to be executed:
public void refresh(long loadFlags)
{
ParameterCheck.noLessThan(loadFlags, 0);
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
synchronized(myBrowserControl) {
nativeRefresh(nativeWebShell, loadFlags);
}
}
In the process of refresh, on another thread, the user's
eventDispatched() method is called, which calls history.canBack():
public boolean canBack()
{
myFactory.throwExceptionIfNotInitialized();
Assert.assert(-1 != nativeWebShell);
boolean result = false;
synchronized(myBrowserControl) {
result = nativeCanBack(nativeWebShell);
}
return result;
}
This call blocks on trying to acquire the lock for myBrowserControl, and
the load can't proceed until canBack() returns. DEADLOCK.
-------------
The fix is to use PostEvent instead of PostSynchronous event. This
causes the call to nativeRefresh to return immediately.
git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@86938 18797224-902f-48f8-a5cc-f745e15eee43
8.9 KiB
8.9 KiB