Files
Mozilla/mozilla/java/webclient
edburns%acm.org fb9eb2800c bug=49797
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
2001-02-13 22:19:12 +00:00
..
2001-02-08 23:55:05 +00:00
2001-02-13 22:19:12 +00:00
2000-08-03 21:32:54 +00:00
2000-08-10 01:33:35 +00:00

Here lies the MozWebShell java wrapper to mozilla M8.

Authors: Kirk Baker <kbaker@eb.com>
         Ian Wilkinson <iw@ennoble.co>

Build hacking and packaging: Ed Burns <edburns@acm.org>

Unix port: Mark Lin <mark.lin@eng.sun.com>

========================================================================
Win32 Build Directions:
========================================================================
Requirements:

* built mozilla with source code from after 10/5/99

* JDK1.1.7 or greater

* built org.mozilla.util java classes (see NOTE_UTIL)

* Perl 5 perl.exe must be in your path

How To Build:

* Follow the directions in ..\README

* type "nmake /f makefile.win all" and hope for the best

How to Run:

* once the build has successfully completed, run this batch file:

  .\src\WIN32_D.OBJ\runem.bat <opt: YOUR_URL>

  Note that YOUR_URL is probably necessary since firewall support wasn't
  working in M8.


Problems:

* clobber_all doesn't remove the .class files from dist\classes.  You
  have to do this manually.

* post to netscape.public.mozilla.java newsgroup

========================================================================
Unix Build Directions (currently only Linux, 
Solaris support is coming soon):
========================================================================
Requirements:

* built mozilla tree for some variant of Linux

* JDK1.2 with native threads support from http://www.blackdown.org 
(JDK1.1 doesn't seem to work)

* built org.mozilla.util java classes (see NOTE_UTIL)

How To Build:

* Follow the directions in ../util/README

* set JDKHOME to where your JDK install directory resides 
	-> setenv JDKHOME /usr/local/jdk1.2

* cd to 'classes' and type "make -f makefile.unix" and hope for the best
	-> cd classes; make -f Makefile.unix

* then cd to 'src' and type "make -f makefile.unix" and hope for the best
	-> cd src; make -f Makefile.unix

How to Run:

* once the build has successfully completed, run 'runem.unix' in your
'src' directory:
	-> cd src; ./runem.unix <YOUR_URL>

  Note that YOUR_URL is probably necessary since firewall support wasn't
  working in M8.

Problems? Email mark.lin@eng.sun.com or post to netscape.public.mozilla.java.

========================================================================
NOTE_UTIL:
========================================================================
* this package depends on the org.mozilla.util classes, which can be
  found in the mozilla tree under mozilla\java\util.  They are a
  separate checkout and build.  Once you check out the org.mozilla.util
  classes, see the README in the mozilla\java\util\README.

General notes:

* Please update the ChangeLog (changelo) when you make changes.