mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
3dafb8d491
- Bug 1162293 - Part 1: Remove instances of #ifdef PR_LOGGING. r=froydnj (20456f454)
- Bug 1162293 - Part 2: Fix string leak in logging code. r=froydnj (2b7552940)
- Bug 1162748 - Remove instances of #ifdef PR_LOGGING in graphics. r=froydnj (1ec0e8140)
- Bug 1156632 - Remove unused forward class declarations - patch 1 - dom/base, r=ehsan (eba98c427)
- Bug 1149420 - Make the IndexedDB permissions prompt work in e10s. r=bent/mfinkle (fc977c048)
- Bug 1156632 - Remove unused forward class declarations - patch 2 - dom/media, dom/indexedDB, dom/svg, r=ehsan (011caf393)
- Bug 1156632 - Remove unused forward class declarations - patch 3 - dom/{events,xbl,xslt,xul} and others, r=ehsan (72051c70b)
- Bug 1148005; Update WebVR APIs based on latest spec changes; r=baku (15b0a712f)
- Bug 1156632 - Remove unused forward class declarations - patch 4 - netwerk image and dom, r=ehsan (5ee4f1679)
- Bug 1139972 - IPC Proxy for charAt, r=tbsaunde (95d3626ec)
- Bug 1139887 - IPC Proxy for caretOffset, r=tbsaunde (c44893cd5)
- Bug 1141228 - include GfxMessageUtils.h in PDocAccessible.ipdl, r=tbsaunde (773e741f9)
- goannaCoordType -> geckoCoordType (b6ede7903)
- Bug 1145292 - IPC Proxy for ImageAccessible, r=tbsaunde (ca37ce753)
- bug 1128751 - handle unbinding and rebinding of documents in content processes r=davidb (0ad3331ab)
- Bug 1145366 - IPC Proxy for HyperLink, r=tbsaunde (87bc696f5)
- Bug 1146615 - IPC Proxy for HyperText, r=tbsaunde (de5322207)
- Bug 1146665 - IPC Proxy for TableCell, r=tbsaunde (895e24eee)
- Bug 1147079 - IPC Proxy for Table, r=tbsaunde (6e54178fe)
- Bug 1147168 - IPC Proxy for Selection, r=tbsaunde (40b8fa16e)
- Bug 1147518 - IPC Proxy for Action, r=davidb (12d5a235f)
- Bug 1147551 - IPC Proxy for min/cur/max values, r=davidb (3728abc54)
- Bug 1148025 - IPC Proxy for 'Component', r=tbsaunde (38bea1f4a)
- Bug 1148083 - IPC Proxy for Document, r=davidb (a7d53936d)
- Bug 1132854 - Make nsIntSize a typedef of gfx::IntSize. r=Bas, roc (09d0ae0d9)
- goannaRole -> geckoRole (421bdcd36)
- bug 1138436 - start on proxying IAccessible2 r=surkov, r=davidb (b2be8ba44)
- bug 1151402 - proxy most of IAccessibleText and IAccessibleEditableText r=davidb (dff7da028)
- Bug 1162740 - Part 1: Remove instances of #ifdef PR_LOGGING in rdf. r=froydnj (e398edb14)
- Bug 1162740 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj (d873be4f4)
- Bug 1067054 - Remove generic SQLITE_ERROR warning & suppress warning if transaction exists. r=mak (cdc03b034)
- Bug 1137287 - Part 1: Shift some code from InterceptedChannelContent to HttpChannelChild. r=mayhemer (6141690a1)
- Bug 1136969 - Add a check that OnStartRequest is called just once during the lifetime of a channel. r=mcmanus (3b6aa0560)
- Bug 1053650 - Part 1: Add attribute 'networkInterfaceId' to XMLHttpRequest. r=bz Bug 1053650 - Part 2: Populate networkInterfaceId to SocketTransport r=mcmanus Bug 1053650 - Part 3: Make use of gonk-specific per-interface DNS lookup. r=mcmanus Bug 1053650 follow-up: Mark GetNetworkInterfaceId/SetNetworkInterfaceId as override (e308fc405)
113 lines
3.4 KiB
C++
113 lines
3.4 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef mozilla_dom_cache_ReadStream_h
|
|
#define mozilla_dom_cache_ReadStream_h
|
|
|
|
#include "mozilla/ipc/FileDescriptor.h"
|
|
#include "nsCOMPtr.h"
|
|
#include "nsID.h"
|
|
#include "nsIInputStream.h"
|
|
#include "nsISupportsImpl.h"
|
|
#include "mozilla/RefPtr.h"
|
|
#include "nsTArrayForwardDeclare.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
namespace cache {
|
|
|
|
class CacheReadStream;
|
|
class CacheReadStreamOrVoid;
|
|
class PCacheStreamControlParent;
|
|
|
|
// IID for the dom::cache::ReadStream interface
|
|
#define NS_DOM_CACHE_READSTREAM_IID \
|
|
{0x8e5da7c9, 0x0940, 0x4f1d, \
|
|
{0x97, 0x25, 0x5c, 0x59, 0x38, 0xdd, 0xb9, 0x9f}}
|
|
|
|
|
|
// Custom stream class for Request and Response bodies being read from
|
|
// a Cache. The main purpose of this class is to report back to the
|
|
// Cache's Manager when the stream is closed. This allows the Cache to
|
|
// accurately determine when the underlying body file can be deleted,
|
|
// etc.
|
|
//
|
|
// The ReadStream class also provides us with a convenient QI'able
|
|
// interface that we can use to pass additional meta-data with the
|
|
// stream channel. For example, Cache.put() can detect that the content
|
|
// script is passing a Cache-originated-stream back into the Cache
|
|
// again. This enables certain optimizations.
|
|
class ReadStream final : public nsIInputStream
|
|
{
|
|
public:
|
|
// Interface that lets the StreamControl classes interact with
|
|
// our private inner stream.
|
|
class Controllable
|
|
{
|
|
public:
|
|
// Closes the stream, notifies the stream control, and then forgets
|
|
// the stream control.
|
|
virtual void
|
|
CloseStream() = 0;
|
|
|
|
// Closes the stream and then forgets the stream control. Does not
|
|
// notify.
|
|
virtual void
|
|
CloseStreamWithoutReporting() = 0;
|
|
|
|
virtual bool
|
|
MatchId(const nsID& aId) const = 0;
|
|
|
|
virtual bool
|
|
HasEverBeenRead() const = 0;
|
|
|
|
NS_IMETHOD_(MozExternalRefCountType)
|
|
AddRef(void) = 0;
|
|
|
|
NS_IMETHOD_(MozExternalRefCountType)
|
|
Release(void) = 0;
|
|
};
|
|
|
|
static already_AddRefed<ReadStream>
|
|
Create(const CacheReadStreamOrVoid& aReadStreamOrVoid);
|
|
|
|
static already_AddRefed<ReadStream>
|
|
Create(const CacheReadStream& aReadStream);
|
|
|
|
static already_AddRefed<ReadStream>
|
|
Create(PCacheStreamControlParent* aControl, const nsID& aId,
|
|
nsIInputStream* aStream);
|
|
|
|
void Serialize(CacheReadStreamOrVoid* aReadStreamOut);
|
|
void Serialize(CacheReadStream* aReadStreamOut);
|
|
|
|
private:
|
|
class Inner;
|
|
|
|
explicit ReadStream(Inner* aInner);
|
|
~ReadStream();
|
|
|
|
// Hold a strong ref to an inner class that actually implements the
|
|
// majority of the stream logic. Before releasing this ref the outer
|
|
// ReadStream guarantees it will call Close() on the inner stream.
|
|
// This is essential for the inner stream to avoid dealing with the
|
|
// implicit close that can happen when a stream is destroyed.
|
|
RefPtr<Inner> mInner;
|
|
|
|
public:
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_CACHE_READSTREAM_IID);
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
|
NS_DECL_NSIINPUTSTREAM
|
|
};
|
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(ReadStream, NS_DOM_CACHE_READSTREAM_IID);
|
|
|
|
} // namespace cache
|
|
} // namespace dom
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_dom_cache_ReadStream_h
|