This change-bundle is the start of loadFromStream(). Currently, I'm

only able to load the first burst from the RandomHTMLInputStream,
because for some reason the native stream is getting closed prematurely.
Need to investigate more.

M classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java

- remove loadFromStreamBlocking.  No point in implementing this since
  the loadFromStream() impl is inherently multi-threaded.

M src_moz/EmbedWindow.cpp
M src_moz/EmbedWindow.h

- expose LoadStream() method that wraps same on nsIDocShell.

M src_moz/InputStreamShim.cpp

- Do a lock around our buffer deletion in or dtor.

M src_moz/Makefile.in

- activate nsActions and NavigationActionEvents

M src_moz/NavigationActionEvents.cpp
M src_moz/NavigationActionEvents.h

- comment out everything but wsLoadFromStreamEvent.

- fix it to work with the NativeBrowserControl.

M src_moz/NavigationImpl.cpp

- activate nativeLoadFromStream.  This is the first *new* version method
  to use the old native event queue.

M src_moz/ns_util.cpp
M src_moz/ns_util.h

- remove unused first arg from Post*Event methods.

M test/automated/src/classes/org/mozilla/webclient/NavigationTest.java

- activate loadFromStream test.

M test/automated/src/classes/org/mozilla/webclient/RandomHTMLInputStream.java

- add a randomExceptions param to the ctor to enable or disable randomly
  thrown exceptions.


git-svn-id: svn://10.0.0.236/trunk@155640 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2004-04-28 16:40:15 +00:00
parent b6400336f4
commit 1ef606ae5f
12 changed files with 95 additions and 90 deletions

View File

@@ -38,6 +38,7 @@
#include "nsNetCID.h"
#include "NativeBrowserControl.h"
#include "NavigationActionEvents.h"
#include "ns_util.h"
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_NavigationImpl_nativeLoadURL
@@ -84,8 +85,6 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_Navigatio
::util_ReleaseStringChars(env, urlString, (const jchar *) urlStringChars);
}
/**********************
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_NavigationImpl_nativeLoadFromStream
(JNIEnv *env, jobject obj, jint nativeBCPtr, jobject stream, jstring uri,
jstring contentType, jint contentLength, jobject loadProperties)
@@ -117,7 +116,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_Navigatio
goto NLFS_CLEANUP;
}
// the deleteGlobalRef is done in the wsLoadFromStream destructor
// the deleteGlobalRef is done in the InputStreamShim destructor
if (!(globalStream = ::util_NewGlobalRef(env, stream))) {
::util_ThrowExceptionToJava(env, "Exception: nativeLoadFromStream: unable to create gloabal ref to stream");
goto NLFS_CLEANUP;
@@ -142,7 +141,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_Navigatio
::util_ThrowExceptionToJava(env, "Exception: nativeLoadFromStream: can't create wsLoadFromStreamEvent");
goto NLFS_CLEANUP;
}
::util_PostSynchronousEvent(nativeBrowserControl, (PLEvent *) *actionEvent);
::util_PostSynchronousEvent((PLEvent *) *actionEvent);
NLFS_CLEANUP:
::util_ReleaseStringChars(env, uri, (const jchar *) uriStringUniChars);
@@ -153,6 +152,8 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_Navigatio
// wsLoadFromStreamEvent destructor.
}
/**********************
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_NavigationImpl_nativePost