mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Enabling ByteArrayInputStream. Needed to fix 32600, r=warren
This commit is contained in:
parent
9016cdb15c
commit
6ebbc29aa6
@ -11,3 +11,4 @@ nsStorageStream.h
|
||||
nsLocalFile.h
|
||||
nsLocalFileMac.h
|
||||
nsILocalFileMac.h
|
||||
nsIByteArrayInputStream.h
|
||||
|
@ -6,3 +6,4 @@ nsIOutputStream.idl
|
||||
nsIPipe.idl
|
||||
nsIFile.idl
|
||||
nsILocalFile.idl
|
||||
nsIByteArrayInputStream.idl
|
||||
|
@ -50,6 +50,7 @@ CPPSRCS = \
|
||||
nsBinaryStream.cpp \
|
||||
nsStorageStream.cpp \
|
||||
nsScriptableInputStream.cpp \
|
||||
nsByteArrayInputStream.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
@ -67,6 +68,7 @@ EXPORTS = \
|
||||
nsSpecialSystemDirectory.h \
|
||||
nsScriptableInputStream.h \
|
||||
nsStorageStream.h \
|
||||
nsIByteArrayInputStream.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
@ -84,6 +86,7 @@ XPIDLSRCS = \
|
||||
nsIScriptableInputStream.idl \
|
||||
nsIStorageStream.idl \
|
||||
nsIDirectoryService.idl \
|
||||
nsIByteArrayInputStream.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
@ -19,8 +19,6 @@
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
|
||||
|
||||
DEPTH=..\..
|
||||
MODULE = xpcom
|
||||
|
||||
@ -40,6 +38,7 @@ EXPORTS = \
|
||||
nsStorageStream.h \
|
||||
nsScriptableInputStream.h \
|
||||
nsDirectoryService.h \
|
||||
nsIByteArrayInputStream.h \
|
||||
$(NULL)
|
||||
|
||||
NO_XPT_GEN=1
|
||||
@ -60,6 +59,7 @@ XPIDLSRCS = \
|
||||
.\nsIFile.idl \
|
||||
.\nsILocalFile.idl \
|
||||
.\nsIDirectoryService.idl \
|
||||
.\nsIByteArrayInputStream.idl \
|
||||
$(NULL)
|
||||
|
||||
################################################################################
|
||||
@ -95,6 +95,7 @@ CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsFileSpecImpl.obj \
|
||||
.\$(OBJDIR)\nsFileSpecStreaming.obj \
|
||||
.\$(OBJDIR)\nsSpecialSystemDirectory.obj \
|
||||
.\$(OBJDIR)\nsByteArrayInputStream.obj \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -22,9 +22,12 @@
|
||||
#include "nsByteArrayInputStream.h"
|
||||
#include "nsIAllocator.h"
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(nsByteArrayInputStream, nsIInputStream, nsIBaseStream)
|
||||
|
||||
nsByteArrayInputStream::nsByteArrayInputStream (char *buffer, PRUint32 bytes)
|
||||
: _buffer (buffer), _nbytes (bytes), _pos (0)
|
||||
{
|
||||
NS_INIT_REFCNT ();
|
||||
}
|
||||
|
||||
nsByteArrayInputStream::~nsByteArrayInputStream ()
|
||||
@ -33,8 +36,6 @@ nsByteArrayInputStream::~nsByteArrayInputStream ()
|
||||
nsAllocator::Free (_buffer);
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS (nsByteArrayInputStream, NS_GET_IID (nsIByteArrayInputStream))
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsByteArrayInputStream::Available (PRUint32* aResult)
|
||||
{
|
||||
|
@ -24,11 +24,6 @@
|
||||
|
||||
class nsByteArrayInputStream : public nsIByteArrayInputStream
|
||||
{
|
||||
public:
|
||||
nsByteArrayInputStream (char *buffer, PRUint32 nbytes);
|
||||
virtual ~nsByteArrayInputStream();
|
||||
|
||||
private:
|
||||
// nsISupports methods
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@ -37,7 +32,12 @@ private:
|
||||
|
||||
// nsIInputStream methods
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
|
||||
public:
|
||||
nsByteArrayInputStream (char *buffer, PRUint32 nbytes);
|
||||
virtual ~nsByteArrayInputStream ();
|
||||
|
||||
private:
|
||||
char *_buffer;
|
||||
PRUint32 _nbytes;
|
||||
PRUint32 _pos;
|
||||
|
Loading…
Reference in New Issue
Block a user