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

@@ -134,34 +134,6 @@ public void loadURL(String absoluteURL)
}
});
}
public void loadFromStreamBlocking(InputStream stream, String uri,
String contentType, int contentLength,
Properties loadInfo) {
ParameterCheck.nonNull(stream);
ParameterCheck.nonNull(uri);
ParameterCheck.nonNull(contentType);
if (contentLength < -1 || contentLength == 0) {
throw new RangeException("contentLength value " + contentLength +
" is out of range. It is should be either -1 or greater than 0.");
}
final InputStream finalStream = stream;
final String finalUri = uri;
final String finalContentType = contentType;
final int finalContentLength = contentLength;
final Properties finalLoadInfo = loadInfo;
NativeEventThread.instance.pushBlockingWCRunnable(new WCRunnable() {
public Object run() {
nativeLoadFromStream(NavigationImpl.this.getNativeBrowserControl(),
finalStream, finalUri,
finalContentType,
finalContentLength, finalLoadInfo);
return null;
}
});
}
public void refresh(long loadFlags)
{
@@ -275,7 +247,7 @@ public static void main(String [] args)
Log.setApplicationName("NavigationImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: NavigationImpl.java,v 1.6 2004-04-28 14:39:54 edburns%acm.org Exp $");
Log.setApplicationVersionDate("$Id: NavigationImpl.java,v 1.7 2004-04-28 16:40:15 edburns%acm.org Exp $");
try {
org.mozilla.webclient.BrowserControlFactory.setAppData(args[0]);