32 Commits

Author SHA1 Message Date
edburns%acm.org
f200bcbd85 Make webclient compile with 0.9.2.
git-svn-id: svn://10.0.0.236/trunk@99970 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-27 19:24:40 +00:00
edburns%acm.org
10ac9247f6 bug=64332
r=edburns
author=rpotts

This fix seems to prevent the deadlock.


git-svn-id: svn://10.0.0.236/trunk@99604 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-19 22:48:08 +00:00
edburns%acm.org
7a9fd4f3cc Removed inadvertantly remaining debugging statement.
git-svn-id: svn://10.0.0.236/trunk@99515 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-18 21:07:14 +00:00
edburns%acm.org
63e952a9ad Update
git-svn-id: svn://10.0.0.236/trunk@99513 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-18 20:56:48 +00:00
ashuk%eng.sun.com
0e27a8b3dc Bug=70656
author=ashuk
ra=edburns

Files modified:
src_moz/NativeEventThread.cpp

The fix allows webclient to startup correctly with more than
1 profile present.


git-svn-id: svn://10.0.0.236/trunk@96308 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-04 18:50:05 +00:00
edburns%acm.org
bc1b833426 Bug 76405
a=edburns
author = edburns ashuk
r=edburns

Files in fix for this bug:

M dom/classes/Makefile
M webclient/src_moz/CBrowserContainer.cpp
M webclient/src_moz/CBrowserContainer.h
M webclient/src_moz/CurrentPageActionEvents.cpp
M webclient/src_moz/HistoryActionEvents.cpp
M webclient/src_moz/Makefile.in
M webclient/src_moz/NativeEventThread.cpp
M webclient/src_moz/motif/MotifBrowserControlCanvas.cpp

This checkin makes Webclient work with the Mozilla trunk as of 27 April
0100 PDT.


git-svn-id: svn://10.0.0.236/trunk@93341 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 00:53:21 +00:00
edburns%acm.org
447399fb12 // replace nsString::Recycle with nsMemory::Free
java/dom/jni/org_mozilla_dom_events_MouseEventImpl.cpp
java/dom/jni/org_mozilla_dom_events_UIEventImpl.cpp
java/dom/jni/org_mozilla_dom_events_EventImpl.cpp
java/dom/jni/org_mozilla_dom_ProcessingInstructionImpl.cpp
java/dom/jni/org_mozilla_dom_NodeImpl.cpp
java/dom/jni/org_mozilla_dom_NamedNodeMapImpl.cpp
java/dom/jni/org_mozilla_dom_ElementImpl.cpp
java/dom/jni/org_mozilla_dom_DOMImplementationImpl.cpp
java/dom/jni/org_mozilla_dom_DocumentImpl.cpp
java/dom/jni/org_mozilla_dom_CharacterDataImpl.cpp
java/dom/jni/org_mozilla_dom_AttrImpl.cpp
java/dom/jni/javaDOMEventsGlobals.cpp

// On*DocumentLoad() now takes an nsIRequest instead of an nsIChannel.
// nsIChannel extends nsIRequest.
java/dom/src/nsJavaDOMImpl.cpp
java/dom/src/nsJavaDOMImpl.h
java/dom/src/nsIJavaDOM.h

// nsIChannel instances replaced with nsIRequest. Removed ShowModal(),
// ExitModalLoop(), FindNamedBrowserItem().  Parameter changes for
// {Set,Get}Persistence().  Add DestroyBrowserWindow(), IsWindowModal().
// supports weak references
java/webclient/src_moz/CBrowserContainer.h
java/webclient/src_moz/CBrowserContainer.cpp

// GetProfileList now returns an array of profile names.  Need to use
// nsIProfileInternal instead of nsIProfile for StartupWithArgs.
java/webclient/src_moz/NativeEventThread.cpp

// Remove -lxpfelocation_s
java/webclient/src_moz/Makefile.in

// Don't include appfilelocprovider_s
java/webclient/src_moz/Makefile.win

// Don't assert thread safe, cause we are thread safe
java/webclient/src_moz/InputStreamShim.cpp


git-svn-id: svn://10.0.0.236/trunk@91060 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-02 22:48:33 +00:00
ashuk%eng.sun.com
e483742f91 Merging JAVADEV_RTM_20001102 into Trunk
_Ashu


git-svn-id: svn://10.0.0.236/trunk@91051 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-02 21:18:06 +00:00
ashuk%eng.sun.com
5af8d651a6 author=ashuk
Bug=57725,49126
r=a=edburns


git-svn-id: svn://10.0.0.236/trunk@82254 18797224-902f-48f8-a5cc-f745e15eee43
2000-11-03 01:30:54 +00:00
edburns%acm.org
aee4ebbf93 Merged branch JAVADEV_PR3_20001002 into trunk.
git-svn-id: svn://10.0.0.236/trunk@82247 18797224-902f-48f8-a5cc-f745e15eee43
2000-11-02 23:33:21 +00:00
edburns%acm.org
ffa897dd6d These changes make it so webclient compiles with the tip as of 20
September 2000.  It will run, but without bookmarks.

The changes consist of the following kinds of changes:

Changes to method signatures for methods implemented by webclient.

Changes to string functions.

Changes to account for the demise of PROGIDS in favor of ContractIDs

Modified files:

M classes_spec/org/mozilla/webclient/test/EMWindow.java
M src_moz/CBrowserContainer.cpp
M src_moz/CurrentPageImpl.cpp
M src_moz/Makefile.win
M src_moz/NativeEventThread.cpp
M src_moz/RDFEnumeration.cpp
M src_moz/RDFTreeNode.cpp
M src_moz/ns_util_export.cpp
M src_moz/rdf_util.cpp


git-svn-id: svn://10.0.0.236/trunk@79658 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 21:53:05 +00:00
edburns%acm.org
1f01dae006 a=edburns
r=ashuk
bug=47357
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M src_moz/CBrowserContainer.cpp
M src_moz/NativeEventThread.cpp
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

tar -cvf 47357.2.tar classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

cvs diff -u classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change modifes what one has to do on the native side to add a
listener.

 * How to create a new listener type on the native side: <P>

 * 1. add an entry in the gSupportedListenerInterfaces array defined in
 * ns_util.cpp <P>

 * 2. add a corresponding entry in the LISTENER_CLASSES enum in
 * ns_util.h <P>

 * 3. add a jstring to the string constant list in
 * CBrowserContainer.cpp, below.

 * 4. Initialize this jstring constant in CBrowserContainer.cpp
 * initStringConstants() <P>

 * 5. add an entry to the switch statement in NativeEventThread.cpp
 * native{add,remove}Listener <P>

You have to clobber_all in webclient after this change.


git-svn-id: svn://10.0.0.236/trunk@76019 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 21:38:52 +00:00
edburns%acm.org
60bfaf0127 bug=48227
author=edburns
a=edburns
r=ashuk

Files in this fix:

M classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
A classes_spec/org/mozilla/webclient/wrapper_native/WCEventListenerWrapper.java
M src_moz/NativeEventThread.cpp
M src_moz/motif/NativeLoaderStub.cpp

Added class WCEventListenerWrapper:

 * This class allows the custom app to have one instance that implements
 * multiple Webclient event listener types. <P>

 * This is simply a "struct" type class that encapsulates a listener
 * instance with its class name.  This is necessary because the class
 * name is lost when we deal with the listener as a
 * WebclientEventListener, and not a WebclientEventListener subclass. <P>

 * @see org.mozilla.webclient.wrapper_native.NativeEventThread#addListener

Made it so when a java listener is added,

 * We create a WCEventListenerWrapper containing the user passed
 * DocumentLoadListener, and the string obtained from
 * DocumentLoadListener.class.getName();

We then call nativeEventThread.addListener:

 * Takes the abstract WebclientEventListener instance and adds it to a
 * Vector of listeners to be added.  This vector is scanned each time
 * around the event loop in run(). <P>

 * The vector is a vector of WCEventListenerWrapper instances.  In run()
 * these are unpacked and sent to nativeAddListener like this:
 * nativeAddListener(nativeWebShell,tempListener.listener,
 * tempListener.listenerClassName); <P>


git-svn-id: svn://10.0.0.236/trunk@75909 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 21:47:39 +00:00
edburns%acm.org
af2702d036 bug=47357
a=edburns
r=ashuk

This change creates a new directory, java/webclient/src_share, that
contains the code that will be used in both src_moz and src_ie, and any
other native browser wrapping implementations.

Here are the steps I followed to implement this change.

1. Create a new directory java/webclient/src_share

2. Move all jni_util*.* files from src_moz into src_share

3. Make it so src_share compiles into a new .lib

   src_share has no netscape dependencies.  Any functionality that
   depended on ns dependencies was kept in src_moz.  In this case, we
   have a function prototype only in src_share, with the implementation
   in src_moz.  We did this for nsHashtable.  The other trick was for
   things in WebShellInitContext that had nothing to do with Netscape.
   This case was accomodated by creating a new struct, ShareInitContext,
   that contains all WebShellInitContext members that have nothing to do
   with Netscape.  Currently this is just jobject propertiesClass.  I
   modified the WebShellInitContext struct to contain a ShareContext
   struct as its last member.  There are two new methods in jni_util.h
   that allow for the initialization and deallocation of the members of
   the ShareContext struct.

4. Make it so src_moz uses the new .lib to provide the jni_util behavior

  a. Create ns_util* files that include ../src_share/jni_util* files
  appropriately.

  The only tricky part was for things in jni_util.h that

Here's the list of files in this change.

cvs -z3 -n update (in directory D:\Projects\mozilla\java\webclient)
cvs server: Updating .
M Makefile.win // added src_share to DIRS
M src_moz/BookmarksImpl.cpp             // include ns_util instead of jni_util
M src_moz/CBrowserContainer.cpp         // include ns_util instead of jni_util
M src_moz/CBrowserContainer.h           // include ns_util instead of jni_util
M src_moz/CurrentPageImpl.cpp           // include ns_util instead of jni_util
M src_moz/HistoryImpl.cpp               // include ns_util instead of jni_util
M src_moz/Makefile.win                  // include ns_util instead of jni_util
M src_moz/NativeEventThread.cpp         // include ns_util instead of jni_util
M src_moz/NavigationImpl.cpp            // include ns_util instead of jni_util
M src_moz/RDFEnumeration.cpp            // include ns_util instead of jni_util
M src_moz/RDFTreeNode.cpp               // include ns_util instead of jni_util
M src_moz/WindowControlImpl.cpp         // include ns_util instead of jni_util
                                        // also use new util_InitShareContext
                                        // function
M src_moz/WrapperFactoryImpl.cpp        // include ns_util instead of jni_util
R src_moz/jni_util.cpp                  // moved to ../src_share
R src_moz/jni_util.h                    // moved to ../src_share
R src_moz/jni_util_export.cpp           // moved to ../src_share
R src_moz/jni_util_export.h             // moved to ../src_share
M src_moz/nsActions.cpp                 // include ns_util instead of jni_util
                                        // also use new
util_DeallocateShareContext
M src_moz/nsActions.h                   // include ns_util instead of jni_util
A src_moz/ns_util.cpp                   // include jni_util.h
A src_moz/ns_util.h                     // include jni_util.h, changes to
                                        // WebshellInitContext struct
A src_moz/ns_util_export.cpp            // provide impls for methods in
                                        // jni_util_export.h

A src_share/Makefile.win
A src_share/bal_util.cpp
A src_share/bal_util.h
A src_share/jni_util.cpp
A src_share/jni_util.h
A src_share/jni_util_export.cpp
A src_share/jni_util_export.h

*****CVS exited normally with code 0*****


git-svn-id: svn://10.0.0.236/trunk@75504 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 21:32:54 +00:00
ashuk%eng.sun.com
b5f214c647 author = ashuk
r = edburns
a = edburns

Implements RemoveListener


git-svn-id: svn://10.0.0.236/trunk@74818 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 20:07:11 +00:00
edburns%acm.org
468587270c a=edburns
r=ashuk
bugs: 44327, 44328

NativeEventThread:

Re-instate the policy of creating an EventQueue for each window.
Put in a superfluous printf in processEventLoop that fixes 44327.

nsActions.{cpp,h}:

Added wsDeallocateInitContextEvent, to enable the correct
removal of the eventQueue, 44328

WindowControlImpl

Fire the wsDeallocateInitcontextEvent in nativeDestroyInitContext.


git-svn-id: svn://10.0.0.236/trunk@73826 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-07 18:53:07 +00:00
edburns%acm.org
da177fe5fd Whitespace formatting changes.
git-svn-id: svn://10.0.0.236/trunk@73687 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-05 20:27:41 +00:00
ashuk%eng.sun.com
ad8ed2e23e bug=44279
a=edburns
r=edburns
author=ashuk.

This code makes Webclient work with Mozilla M16.


git-svn-id: svn://10.0.0.236/trunk@73562 18797224-902f-48f8-a5cc-f745e15eee43
2000-06-30 00:01:58 +00:00
edburns%acm.org
3f164dfaa6 Remove CRLF's accidentally put in by Ashu.
git-svn-id: svn://10.0.0.236/trunk@71747 18797224-902f-48f8-a5cc-f745e15eee43
2000-06-08 00:52:50 +00:00
ashuk%eng.sun.com
62677f207f Ed's fix for bug where multiple windows closing caused null ptr dereference.
author = edburns
r = ashuk


git-svn-id: svn://10.0.0.236/trunk@71179 18797224-902f-48f8-a5cc-f745e15eee43
2000-05-31 21:54:04 +00:00
edburns%acm.org
bcbf08419d bug: 20659
r=gbarney
a=edburns

This checkin adds java.awt.event.MouseListener support to webclient for
mozilla.  The following files are include in this checkin.  "A" is new
file "M" is modified file.

A classes_spec/org/mozilla/webclient/WCMouseEvent.java
A classes_spec/org/mozilla/webclient/wrapper_native/WCMouseListenerImpl.java
A src_moz/DOMMouseListenerImpl.cpp
A src_moz/DOMMouseListenerImpl.h
A src_moz/dom_util.cpp
A src_moz/dom_util.h

M classes_spec/org/mozilla/webclient/EventRegistration.java
M classes_spec/org/mozilla/webclient/test/EMWindow.java
M classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M src_moz/DocumentLoaderObserverImpl.cpp
M src_moz/DocumentLoaderObserverImpl.h
M src_moz/EventRegistration.cpp
M src_moz/EventRegistration.h
M src_moz/Makefile.solaris
M src_moz/Makefile.win
M src_moz/NativeEventThread.cpp
M src_moz/NavigationImpl.cpp
M src_moz/RDFTreeNode.cpp
M src_moz/bal_util.cpp
M src_moz/jni_util.cpp
M src_moz/jni_util.h
M src_moz/jni_util_export.cpp
M src_moz/jni_util_export.h



A classes_spec/org/mozilla/webclient/WCMouseEvent.java

 * <P> This java.awt.event.MouseEvent subclass allows the user to access the
 * WebclientEvent.  This eventData of this WebclientEvent, if non-null,
 * is a java.util.Properties instance that contains information about
 * this event.  </P>

 * <P>The following are some interesting keys:</P>

 * <UL>

 * <LI> href
 * </LI>

 * <LI> #text
 * </LI>

 * </UL>

A classes_spec/org/mozilla/webclient/wrapper_native/WCMouseListenerImpl.java

 * This class wraps the user provided instance of
 * java.awt.event.MouseListener so it can be installed as a
 * WebclientEventListener.  Note that we implement MouseListener so we
 * can be detected by the webclient event system.  We don't do anything
 * with these methods here, though.


A src_moz/DOMMouseListenerImpl.cpp

A src_moz/DOMMouseListenerImpl.h

 * This class is the shim between the mozilla listener event system for
 * mouse events and the java MouseListener interface.
 * For each of the Mouse* methods, we call the appropriate method in java.
 * See the implementation of MouseOver for an example.

 * For each mouseEvent, we create a Properties object containing
 * information about the event.  We use methods in dom_util to do this.

A src_moz/dom_util.cpp

A src_moz/dom_util.h

/**

 * Methods to simplify webclient accessing the mozilla DOM.

 */

M classes_spec/org/mozilla/webclient/EventRegistration.java

Added support for java.awt.event.MouseListener

M classes_spec/org/mozilla/webclient/test/EMWindow.java

Implemented simle MouseListener

M classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java

Added support for java.awt.event.MouseListener

M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java

Added support for java.awt.event.MouseListener

M src_moz/DocumentLoaderObserverImpl.cpp
M src_moz/DocumentLoaderObserverImpl.h

 * We define a local IID to allow the addDocumentLoadListener and
 * addMouseListener functions in EventRegistration.{h,cpp} to
 * interrogate the currently installed DocumentLoaderObserver instance
 * in mozilla.

 */

#define NS_IDOCLOADEROBSERVERIMPL_IID_STR "fdadb2e0-3028-11d4-8a96-0080c7b9c5ba"

#define NS_IDOCLOADEROBSERVERIMPL_IID {0xfdadb2e0, 0x3028, 0x11d4, { 0x8a, 0x96, 0x00, 0x80, 0xc7, 0xb9, 0xc5, 0xba }}

/**

 * This class is the shim between the mozilla listener event system for
 * document load events and the java DocumentLoadListener interface.
 * For each of the On* methods, we call the appropriate method in java.
 * See the implementation of OnEndDocumentLoad for an example.

 * A DocumentLoaderObserverImpl instance has a "jobject target", which
 * is the Java object that should ultimately receive the events.  This
 * target will be null if the user just wants to listen for mouse
 * events.  It willl be non-null if the user wants to listen for
 * DocumentLoad events.

 * It also hosts a nsIDOMMouseListener instance, which piggybacks on the
 * nsIDocumentLoaderObserver instance.

M src_moz/EventRegistration.cpp
M src_moz/EventRegistration.h

Add support for MouseListener

M src_moz/Makefile.win

Added classes for MouseListener and Dom access

M src_moz/NativeEventThread.cpp

Added support for MouseListener

M src_moz/NavigationImpl.cpp

Added call to ReleaseStringChars for bal case.

M src_moz/RDFTreeNode.cpp

Added call to ReleaseStringChars for bal case.

M src_moz/bal_util.cpp

Added #include "wchar.h" so this file compiles on Solaris.

M src_moz/jni_util.cpp

Added implementations for util_CreatePropertiesObject,
util_DestroyPropertiesObject and util_StoreIntoPropertiesObject.

M src_moz/jni_util.h

/**

 * A JNI wrapper to create a java.util.Properties object, or the
 * equivalent object in the BAL case.

 */

jobject util_CreatePropertiesObject(JNIEnv *env, jobject reserved_NotUsed);

/**

 * A JNI wrapper to destroy the object from CreatePropertiesObject

 */

void util_DestroyPropertiesObject(JNIEnv *env, jobject propertiesObject,
                                  jobject reserved_NotUsed);

/**

 * A JNI wrapper for storing a name/value pair into the Properties
 * object created by CreatePropertiesObject

 */

void util_StoreIntoPropertiesObject(JNIEnv *env, jobject propertiesObject,
                                    jobject name, jobject value);


M src_moz/jni_util_export.cpp
M src_moz/jni_util_export.h

Added functions for allowing the BAL user to specify functions for
{creating, destroying, setting values into} properties objects.


git-svn-id: svn://10.0.0.236/trunk@70879 18797224-902f-48f8-a5cc-f745e15eee43
2000-05-25 23:51:51 +00:00
edburns%acm.org
394bcff4aa bug 33099
r=shaver
a=edburns

Native code changes: This fix eradicates all
occurrences of the following symbols
 nsComponentManager nsServiceManeger
And replaces them with their nsI counterparts.
The following ns* classes still are used in
webclient, and no plans exist to replace them
with nsI counterparts: nsresult nsCOMPtr
nsCRT nsnull * nsServiceManager occurrences
were replaced with do_GetService(), using a
PROGID. * nsComponentManager occurrences were replaced with a call on the global class gComponentManager, declared in the new file ns_globals.h, and defined in WrapperFactoryImpl.cpp. ns_globals.h is included in jni_util.h. See the attachment to bug 33099 for ns_globals.h * Added deallocation code to WindowControlImpl.cpp nativeTerminate. I know it doesn't do much, but it's correct. Java code changes: * Added static method BrowserControlFactory.appTerminate(). This method simply calls the existing BrowserControlImpl.appTerminate(), which calls WrapperFactoryImpl.cpp nativeTerminate(). BrowserControlFactory.appTerminate() is called from EmbeddedMozilla's WindowListener, which gets fired when the user signals she wants the app to terminate.


git-svn-id: svn://10.0.0.236/trunk@66563 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-20 18:16:05 +00:00
ashuk%eng.sun.com
0056fc3244 Added stuff to implement Find features in CurrentPage interface
a=ashuk
r=edburns
Bug=20659

_Ashu


git-svn-id: svn://10.0.0.236/trunk@65428 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-06 17:39:01 +00:00
edburns%acm.org
6bd98defd0 bug: http://bugzilla.mozilla.org/show_bug.cgi?id=34665
This change replaces all printfs in src_moz with calls to PR_LOG.  No
printfs should appear in src_moz anymore.

You won't see any console output from native code unless you define

NSPR_LOG_MODULES=webclient:3

in your environment.  Furthermore, if you want PR_LOG statements in
webclient to go to a file instead, define

WEBCLIENT_LOG_FILE=C:\VALIDDIR\filename.txt

in your environment.  This file will get created fresh each time, since
PR_LOG uses fopen(filename, "w").

New Files:

I've created ns_globals.h, included from jni_util.h.  ns_globals.h holds
an extern * to a struct used in the PR_LOG calls.

Significant changes:

WrapperFactoryImpl.cpp

nativeAppInitialize(){

Added:

#if DEBUG_RAPTOR_CANVAS
    prLogModuleInfo = PR_NewLogModule("webclient");
    const char *webclientLogFile = PR_GetEnv("WEBCLIENT_LOG_FILE");
    if (nsnull != webclientLogFile) {
        PR_SetLogFile(webclientLogFile);
        // If this fails, it just goes to stdout/stderr
    }
#endif
}

All the other files in this checkin follow the this pattern:

Before checkin:

       printf("InitMozillaStuff(%lx): Create the Event Queue for the UI thread...\n",
               initContext);

After checkin:

    if (prLogModuleInfo) {
        PR_LOG(prLogModuleInfo, 3,
               ("InitMozillaStuff(%lx): Create the Event Queue for the UI thread...\n",
               initContext));
    }

See http://lxr.mozilla.org/mozilla/source/nsprpub/pr/include/prlog.h#190

for the definition of PR_LOG


git-svn-id: svn://10.0.0.236/trunk@65380 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-05 21:38:27 +00:00
edburns%acm.org
3f3dd34f18 Thanks to Andi Eades, and Steffen Grarup for finding and fixing this.
Basically, we were storing a local jobject ref and using it on
 another thread without calling NewGlobalRef.

The fix is below:

cvs diff WindowControlImpl.cpp NativeEventThread.cpp (in directory D:\Projects\mozilla\java\webclient\src_moz\)
Index: WindowControlImpl.cpp
===================================================================
RCS file: /cvsroot/mozilla/java/webclient/src_moz/WindowControlImpl.cpp,v
retrieving revision 1.5
diff -r1.5 WindowControlImpl.cpp
131c131,134
<     initContext->nativeEventThread = nsnull;
---
>     if (nsnull != initContext->nativeEventThread) {
>         ::util_DeleteGlobalRef(env, initContext->nativeEventThread);
>         initContext->nativeEventThread = nsnull;
>     }
Index: NativeEventThread.cpp
===================================================================
RCS file: /cvsroot/mozilla/java/webclient/src_moz/NativeEventThread.cpp,v
retrieving revision 1.7
diff -r1.7 NativeEventThread.cpp
213c213,215
<         initContext->nativeEventThread = obj; // VERY IMPORTANT!!
---
>         initContext->nativeEventThread =
>             ::util_NewGlobalRef(env, obj); // VERY IMPORTANT!!
>

*****CVS exited normally with code 1*****


git-svn-id: svn://10.0.0.236/trunk@64778 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-31 17:09:00 +00:00
edburns%acm.org
4287100562 bug=33093
a=edburns
r=ashuk

Force prefs to be read, causing the proxy data to be read.


git-svn-id: svn://10.0.0.236/trunk@63908 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-23 23:08:35 +00:00
edburns%acm.org
b849f414a1 bug=33093
a=edburns
r=ashuk

Force prefs to be read, causing the proxy data to be read.


git-svn-id: svn://10.0.0.236/trunk@63901 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-23 22:57:57 +00:00
edburns%acm.org
b233b02f87 bug=32011
r=ashuk
a=edburns
This set of changes replaces all occurrences of

env->Func(args...)

with

::util_Func(env, args...)

Except of course, for the implementations of the above mentioned
::util_Func() functions.

This is done to allow the JNI functions to be called from a non JNI
context, such as UNO.


git-svn-id: svn://10.0.0.236/trunk@63190 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-16 23:07:03 +00:00
edburns%acm.org
f4d7081311 This checkin adds API to cleanly destroy a BrowserControl instance. It
also modifies EmbeddedMozilla so this code is exercised.

I have changed EmbeddedMozilla to be a stub-like class that simply
displays a Frame with a single Button, titled "New Window".  Pressing
this button causes an EMWindow to be created and displayed.  EMWindow is
basically the former EmbeddedMozilla renamed, with modifications to the
WindowListener implementation to call the BrowserControl deallocation
method.

I've added a delete() method to ImplObect:

 * I know Java has automatic garbage collection and all, but explicitly
 * adding a delete method helps the gc algorithm out. <P>

 * Subclasses should override this and call super.delete() at the end of
 * their overridden delete() method.

 * @see org.mozilla.webclient.wrapper_native.ImplObjectNative#delete

and ImplObjectNative:

 * Note how we call super.delete() at the end.  THIS IS VERY IMPORTANT. <P>

 * Also, note how we don't de-allocate nativeWebShell, that is done in
 * the class that owns the nativeWebShell reference, WindowControlImpl.

 * ImplObjectNative subclasses that further override delete() are <P>

<CODE><PRE>
BookmarksImpl.java
EventRegistrationImpl.java
NativeEventThread.java
WindowControlImpl.java
</PRE><CODE> <P>

 * All other ImplObject subclasses don't have any local Ivars and thus
 * don't need to override delete().

I've added a delete() method to BrowserControlImpl:

 * Called from BrowserControlFactory.deleteBrowserControl() <P>

 * The order of deletion of objects is very important! <P>

 * We don't allow deletion if the Canvas is showing. <P>

In BrowserControlImpl's delete(), the important delete()s is for
WindowControlImpl:

 * First, we delete our eventThread, which causes the eventThread to
 * stop running.  Then we call nativeDestroyInitContext(), which
 * deallocates native resources for this window.

As stated above, NativeEventThread.delete() is called:

 * This is a very delicate method, and possibly subject to race
 * condition problems.  To combat this, our first step is to set our
 * browserControlCanvas to null, within a synchronized block which
 * synchronizes on the same object used in the run() method's event
 * loop.  By setting the browserControlCanvas ivar to null, we cause the
 * run method to return.

After all of this deleting, we return from
BrowserControlFactory.delete().


git-svn-id: svn://10.0.0.236/trunk@62772 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-13 18:44:32 +00:00
edburns%acm.org
508cc90c1c bug=31123
a=edburns
r=bruce

Folks, don't EVER use NULL in your c++ code.  Use nsnull instead.


git-svn-id: svn://10.0.0.236/trunk@62456 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-09 05:12:42 +00:00
ashuk%eng.sun.com
dbbd9a87d7 a=edburns
r=edburns
author=ashuk
bug=28407

New native code for spec-compliant impl ported to solaris -- Ashu K.


git-svn-id: svn://10.0.0.236/trunk@62342 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-07 22:33:38 +00:00
edburns%acm.org
2471024921 a=edburns
r=ashuk
bug=2069

Native code for spec compliant webclient impl.


git-svn-id: svn://10.0.0.236/trunk@62196 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-04 01:37:20 +00:00