зеркало из https://github.com/mozilla/gecko-dev.git
Bug 642291 - crash [@ nsBufferedInputStream::Write] demos.mozilla.org motovational poster. ipc serialization does not work here, removing it. r=bent a=blocking-fennec
--HG-- extra : rebase_source : 8f531293638151217106868db8c635997e785647
This commit is contained in:
Родитель
5e3593e053
Коммит
b2201d876e
|
@ -76,8 +76,7 @@ using namespace mozilla;
|
||||||
// from NS_NewByteInputStream is held alive as long as the
|
// from NS_NewByteInputStream is held alive as long as the
|
||||||
// stream is. We do that by passing back this class instead.
|
// stream is. We do that by passing back this class instead.
|
||||||
class DataOwnerAdapter : public nsIInputStream,
|
class DataOwnerAdapter : public nsIInputStream,
|
||||||
public nsISeekableStream,
|
public nsISeekableStream
|
||||||
public nsIIPCSerializable
|
|
||||||
{
|
{
|
||||||
typedef nsDOMMemoryFile::DataOwner DataOwner;
|
typedef nsDOMMemoryFile::DataOwner DataOwner;
|
||||||
public:
|
public:
|
||||||
|
@ -92,29 +91,23 @@ public:
|
||||||
|
|
||||||
NS_FORWARD_NSISEEKABLESTREAM(mSeekableStream->)
|
NS_FORWARD_NSISEEKABLESTREAM(mSeekableStream->)
|
||||||
|
|
||||||
NS_FORWARD_NSIIPCSERIALIZABLE(mSerializableStream->)
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DataOwnerAdapter(DataOwner* aDataOwner,
|
DataOwnerAdapter(DataOwner* aDataOwner,
|
||||||
nsIInputStream* aStream)
|
nsIInputStream* aStream)
|
||||||
: mDataOwner(aDataOwner), mStream(aStream),
|
: mDataOwner(aDataOwner), mStream(aStream),
|
||||||
mSeekableStream(do_QueryInterface(aStream)),
|
mSeekableStream(do_QueryInterface(aStream))
|
||||||
mSerializableStream(do_QueryInterface(aStream))
|
|
||||||
{
|
{
|
||||||
NS_ASSERTION(mSeekableStream, "Somebody gave us the wrong stream!");
|
NS_ASSERTION(mSeekableStream, "Somebody gave us the wrong stream!");
|
||||||
NS_ASSERTION(mSerializableStream, "Somebody gave us the wrong stream!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRefPtr<DataOwner> mDataOwner;
|
nsRefPtr<DataOwner> mDataOwner;
|
||||||
nsCOMPtr<nsIInputStream> mStream;
|
nsCOMPtr<nsIInputStream> mStream;
|
||||||
nsCOMPtr<nsISeekableStream> mSeekableStream;
|
nsCOMPtr<nsISeekableStream> mSeekableStream;
|
||||||
nsCOMPtr<nsIIPCSerializable> mSerializableStream;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_THREADSAFE_ISUPPORTS3(DataOwnerAdapter,
|
NS_IMPL_THREADSAFE_ISUPPORTS2(DataOwnerAdapter,
|
||||||
nsIInputStream,
|
nsIInputStream,
|
||||||
nsISeekableStream,
|
nsISeekableStream)
|
||||||
nsIIPCSerializable)
|
|
||||||
|
|
||||||
nsresult DataOwnerAdapter::Create(DataOwner* aDataOwner,
|
nsresult DataOwnerAdapter::Create(DataOwner* aDataOwner,
|
||||||
PRUint32 aStart,
|
PRUint32 aStart,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче