зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 10ea141649b6 (bug 1348272) for causing mochitest failures on test_domparsing.xhtml. CLOSED TREE
This commit is contained in:
Родитель
61cba40702
Коммит
78b100abc0
|
@ -44,11 +44,21 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1352882
|
|||
ok(str, "encodingToStringWithMaxLength should be successful after calling init again");
|
||||
|
||||
encoder = getEncoder();
|
||||
var stream = {
|
||||
close() {
|
||||
},
|
||||
|
||||
const UINT32_MAX = 4294967295;
|
||||
let pipe = SpecialPowers.Cc["@mozilla.org/pipe;1"].createInstance(SpecialPowers.Ci.nsIPipe);
|
||||
pipe.init(true, true, 0, UINT32_MAX, null);
|
||||
let stream = pipe.outputStream;
|
||||
flush() {
|
||||
},
|
||||
|
||||
write(buffer, length) {
|
||||
return length;
|
||||
},
|
||||
|
||||
writeFrom(buffer, length) {
|
||||
return length;
|
||||
},
|
||||
};
|
||||
|
||||
encoder.setCharset("utf-8");
|
||||
encoder.encodeToStream(stream);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
/**
|
||||
* imgIEncoder interface
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(4baa2d6e-fee7-42df-ae3f-5fbebc0c267c)]
|
||||
[scriptable, uuid(4baa2d6e-fee7-42df-ae3f-5fbebc0c267c)]
|
||||
interface imgIEncoder : nsIAsyncInputStream
|
||||
{
|
||||
// Possible values for outputOptions. Multiple values are semicolon-separated.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* Provides scriptable methods for initializing a nsIInputStream
|
||||
* implementation with an ArrayBuffer.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(3014dde6-aa1c-41db-87d0-48764a3710f6)]
|
||||
[scriptable, uuid(3014dde6-aa1c-41db-87d0-48764a3710f6)]
|
||||
interface nsIArrayBufferInputStream : nsIInputStream
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* An input stream that reads ahead and keeps a buffer coming from another input
|
||||
* stream so that fewer accesses to the underlying stream are necessary.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(616f5b48-da09-11d3-8cda-0060b0fc14a3)]
|
||||
[scriptable, uuid(616f5b48-da09-11d3-8cda-0060b0fc14a3)]
|
||||
interface nsIBufferedInputStream : nsIInputStream
|
||||
{
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ interface nsIBufferedInputStream : nsIInputStream
|
|||
* and does the entire write only when the buffer is full, so that fewer writes
|
||||
* to the underlying output stream are necessary.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(6476378a-da09-11d3-8cda-0060b0fc14a3)]
|
||||
[scriptable, uuid(6476378a-da09-11d3-8cda-0060b0fc14a3)]
|
||||
interface nsIBufferedOutputStream : nsIOutputStream
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,7 @@ struct PRFileDesc;
|
|||
/**
|
||||
* An input stream that allows you to read from a file.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(e3d56a20-c7ec-11d3-8cda-0060b0fc14a3)]
|
||||
[scriptable, uuid(e3d56a20-c7ec-11d3-8cda-0060b0fc14a3)]
|
||||
interface nsIFileInputStream : nsIInputStream
|
||||
{
|
||||
/**
|
||||
|
@ -85,7 +85,7 @@ interface nsIFileInputStream : nsIInputStream
|
|||
/**
|
||||
* An output stream that lets you stream to a file.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(e734cac9-1295-4e6f-9684-3ac4e1f91063)]
|
||||
[scriptable, uuid(e734cac9-1295-4e6f-9684-3ac4e1f91063)]
|
||||
interface nsIFileOutputStream : nsIOutputStream
|
||||
{
|
||||
/**
|
||||
|
@ -132,7 +132,7 @@ interface nsIFileOutputStream : nsIOutputStream
|
|||
/**
|
||||
* A stream that allows you to read from a file or stream to a file.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(82cf605a-8393-4550-83ab-43cd5578e006)]
|
||||
[scriptable, uuid(82cf605a-8393-4550-83ab-43cd5578e006)]
|
||||
interface nsIFileStream : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -185,7 +185,7 @@ interface nsIFileStream : nsISupports
|
|||
* happen when using RemoteLazyInputStream with an underlying file stream, for
|
||||
* example.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(07f679e4-9601-4bd1-b510-cd3852edb881)]
|
||||
[scriptable, uuid(07f679e4-9601-4bd1-b510-cd3852edb881)]
|
||||
interface nsIFileMetadata : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -207,7 +207,7 @@ interface nsIFileMetadata : nsISupports
|
|||
[noscript] PRFileDescPtr getFileDescriptor();
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(de15b80b-29ba-4b7f-9220-a3d75b17ae8c)]
|
||||
[scriptable, uuid(de15b80b-29ba-4b7f-9220-a3d75b17ae8c)]
|
||||
interface nsIAsyncFileMetadata : nsIFileMetadata
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* automatic creation of the content-length header.
|
||||
*/
|
||||
|
||||
[scriptable, builtinclass, uuid(dcbce63c-1dd1-11b2-b94d-91f6d49a3161)]
|
||||
[scriptable, uuid(dcbce63c-1dd1-11b2-b94d-91f6d49a3161)]
|
||||
interface nsIMIMEInputStream : nsIInputStream
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -701,6 +701,11 @@ function CustomPipe(name) {
|
|||
waiter.eventTarget.dispatch(event, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
}
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
"nsIAsyncInputStream",
|
||||
"nsIInputStream",
|
||||
]),
|
||||
});
|
||||
|
||||
/** The output end of this pipe. */
|
||||
|
@ -1045,6 +1050,11 @@ function CustomPipe(name) {
|
|||
waiter.eventTarget.dispatch(event, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
}
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
"nsIAsyncOutputStream",
|
||||
"nsIOutputStream",
|
||||
]),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ interface nsIEventTarget;
|
|||
* necessary that a non-blocking nsIInputStream implementation also implement
|
||||
* nsIAsyncInputStream.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(a5f255ab-4801-4161-8816-277ac92f6ad1)]
|
||||
[scriptable, uuid(a5f255ab-4801-4161-8816-277ac92f6ad1)]
|
||||
interface nsIAsyncInputStream : nsIInputStream
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,7 @@ interface nsIEventTarget;
|
|||
* necessary that a non-blocking nsIOutputStream implementation also implement
|
||||
* nsIAsyncOutputStream.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(beb632d3-d77a-4e90-9134-f9ece69e8200)]
|
||||
[scriptable, uuid(beb632d3-d77a-4e90-9134-f9ece69e8200)]
|
||||
interface nsIAsyncOutputStream : nsIOutputStream
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* @See nsIBinaryOutputStream
|
||||
*/
|
||||
|
||||
[scriptable, builtinclass, uuid(899b826b-2eb3-469c-8b31-4c29f5d341a6)]
|
||||
[scriptable, uuid(899b826b-2eb3-469c-8b31-4c29f5d341a6)]
|
||||
interface nsIBinaryInputStream : nsIInputStream {
|
||||
void setInputStream(in nsIInputStream aInputStream);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ interface nsIOutputStream;
|
|||
* This interface allows writing strings to a stream, doing automatic
|
||||
* character encoding conversion.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(4b71113a-cb0d-479f-8ed5-01daeba2e8d4)]
|
||||
[scriptable, uuid(4b71113a-cb0d-479f-8ed5-01daeba2e8d4)]
|
||||
interface nsIConverterOutputStream : nsIUnicharOutputStream
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ interface nsIOutputStream;
|
|||
/**
|
||||
* nsIIOUtil provdes various xpcom/io-related utility methods.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(e8152f7f-4209-4c63-ad23-c3d2aa0c5a49)]
|
||||
[scriptable, uuid(e8152f7f-4209-4c63-ad23-c3d2aa0c5a49)]
|
||||
interface nsIIOUtil : nsISupports
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -56,7 +56,7 @@ native nsWriteSegmentFun(nsWriteSegmentFun);
|
|||
* the case that a blocking input stream should be implemented using thread-
|
||||
* safe AddRef and Release.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(53cdbc97-c2d7-4e30-b2c3-45b2ee79db18)]
|
||||
[scriptable, uuid(53cdbc97-c2d7-4e30-b2c3-45b2ee79db18)]
|
||||
interface nsIInputStream : nsISupports
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@ interface nsIEventTarget;
|
|||
* reads the specified amount of data from its |source| and copies that
|
||||
* data to its |sink|. |sink| must be a blocking output stream.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(90a9d790-3bca-421e-a73b-98f68e13c917)]
|
||||
[scriptable, uuid(90a9d790-3bca-421e-a73b-98f68e13c917)]
|
||||
interface nsIInputStreamTee : nsIInputStream
|
||||
{
|
||||
attribute nsIInputStream source;
|
||||
|
|
|
@ -50,7 +50,7 @@ native nsReadSegmentFun(nsReadSegmentFun);
|
|||
* generally the case that a blocking output stream should be implemented using
|
||||
* thread- safe AddRef and Release.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(0d0acd2a-61b4-11d4-9877-00c04fa0cf4a)]
|
||||
[scriptable, uuid(0d0acd2a-61b4-11d4-9877-00c04fa0cf4a)]
|
||||
interface nsIOutputStream : nsISupports
|
||||
{
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче