Back out 9fc0e6867256, 6947bbce9672, fb91a23bd158, a5870dd2ad7c, c3d3292fbd1e, 42f2aca1fde9 to fix Android failures on a CLOSED TREE

This commit is contained in:
Matt Brubeck 2011-07-01 11:20:52 -07:00
Родитель 9e8a8df579
Коммит e2840da521
5 изменённых файлов: 12 добавлений и 56 удалений

Просмотреть файл

@ -1,5 +1,3 @@
# -*- makefile -*-
# vim:set ts=8 sw=8 sts=8 noet:
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
@ -25,7 +23,6 @@
# Benjamin Smedberg <bsmedberg@covad.net>
# Chase Phillips <chase@mozilla.org>
# Mark Mentovai <mark@moxienet.com>
# Joey Armstrong <joey@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -98,11 +95,14 @@ endif
AUTOCONF ?= $(shell which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
ifeq (,$(strip $(AUTOCONF)))
AUTOCONF=$(error Could not find autoconf 2.13)
AUTOCONF=$(error Couldn't find autoconf 2.13)
endif
MKDIR := mkdir
SH := /bin/sh
ifndef MAKE
MAKE := gmake
endif
PERL ?= perl
PYTHON ?= python

Просмотреть файл

@ -982,10 +982,7 @@ AC_SUBST(NSINSTALL_BIN)
MOZ_PATH_PROG(DOXYGEN, doxygen, :)
MOZ_PATH_PROG(AUTOCONF, autoconf, :)
MOZ_PATH_PROGS(UNZIP, unzip)
if test -z "$UNZIP" -o "$UNZIP" = ":"; then
AC_MSG_ERROR([unzip not found in \$PATH])
fi
MOZ_PATH_PROG(UNZIP, unzip, :)
MOZ_PATH_PROGS(ZIP, zip)
if test -z "$ZIP" -o "$ZIP" = ":"; then
AC_MSG_ERROR([zip not found in \$PATH])
@ -7828,11 +7825,7 @@ dnl done during packaging with omnijar.
if test "$MOZ_CHROME_FILE_FORMAT" = "omni"; then
MOZ_OMNIJAR=1
AC_DEFINE(MOZ_OMNIJAR)
if test "$OS_ARCH" = "WINNT"; then
MOZ_CHROME_FILE_FORMAT=flat
else
MOZ_CHROME_FILE_FORMAT=symlink
fi
MOZ_CHROME_FILE_FORMAT=flat
elif test "$MOZ_CHROME_FILE_FORMAT" = "jar"; then
AC_DEFINE(MOZ_CHROME_FILE_FORMAT_JAR)
fi
@ -8458,10 +8451,7 @@ if test -z "${GLIB_CFLAGS}" -o -z "${GLIB_LIBS}" ; then
fi
fi
if test -z "${GLIB_GMODULE_LIBS}" \
-a -n "${GLIB_CONFIG}"\
-a "${GLIB_CONFIG}" != no\
; then
if test -z "${GLIB_GMODULE_LIBS}" -a -n "${GLIB_CONFIG}"; then
GLIB_GMODULE_LIBS=`$GLIB_CONFIG gmodule --libs`
fi

Просмотреть файл

@ -72,10 +72,8 @@ public:
NS_DECL_NSIDOMFILE
NS_DECL_NSIXHRSENDABLE
nsDOMFile(nsIFile *aFile, const nsAString& aContentType,
nsISupports *aCacheToken = nsnull)
nsDOMFile(nsIFile *aFile, const nsAString& aContentType)
: mFile(aFile),
mCacheToken(aCacheToken),
mContentType(aContentType),
mIsFullFile(true)
{}
@ -88,7 +86,6 @@ public:
nsDOMFile(const nsDOMFile* aOther, PRUint64 aStart, PRUint64 aLength,
const nsAString& aContentType)
: mFile(aOther->mFile),
mCacheToken(aOther->mCacheToken),
mStart(aOther->mIsFullFile ? aStart :
(aOther->mStart + aStart)),
mLength(aLength),
@ -115,7 +112,6 @@ public:
protected:
nsCOMPtr<nsIFile> mFile;
nsCOMPtr<nsISupports> mCacheToken;
// start and length in
PRUint64 mStart;

Просмотреть файл

@ -1616,25 +1616,8 @@ void nsXMLHttpRequest::CreateResponseBlob(nsIRequest *request)
if (file) {
nsCAutoString contentType;
mChannel->GetContentType(contentType);
nsCOMPtr<nsISupports> cacheToken;
if (cc) {
cc->GetCacheToken(getter_AddRefs(cacheToken));
}
NS_ConvertASCIItoUTF16 wideContentType(contentType);
nsCOMPtr<nsIDOMBlob> blob =
new nsDOMFile(file, wideContentType, cacheToken);
// XXXkhuey this is a complete hack ... but we need to get 6 out the door
// The response blob here should not be a File object, it should only
// be a Blob. Unfortunately, because nsDOMFile has grown through
// accretion over the years and is in dangerous need of a refactoring,
// slicing it is the easiest way to get there ...
PRUint64 size = 0;
blob->GetSize(&size);
blob->MozSlice(0, size, wideContentType, 2, getter_AddRefs(mResponseBlob));
mResponseBlob = new nsDOMFile(file,
NS_ConvertASCIItoUTF16(contentType));
mResponseBody.Truncate();
mResponseBodyUnicode.SetIsVoid(PR_TRUE);
}
@ -1905,20 +1888,9 @@ nsXMLHttpRequest::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult
void *blobData = PR_Malloc(blobLen);
if (blobData) {
memcpy(blobData, mResponseBody.BeginReading(), blobLen);
NS_ConvertASCIItoUTF16 wideContentType(contentType);
nsCOMPtr<nsIDOMBlob> blob =
mResponseBlob =
new nsDOMMemoryFile(blobData, blobLen, EmptyString(),
wideContentType);
// XXXkhuey this is a complete hack ... but we need to get 6 out the door
// The response blob here should not be a File object, it should only
// be a Blob. Unfortunately, because nsDOMFile has grown through
// accretion over the years and is in dangerous need of a refactoring,
// slicing it is the easiest way to get there ...
blob->MozSlice(0, blobLen, wideContentType,
2, getter_AddRefs(mResponseBlob));
NS_ConvertASCIItoUTF16(contentType));
mResponseBody.Truncate();
}
NS_ASSERTION(mResponseBodyUnicode.IsVoid(),

Просмотреть файл

@ -160,8 +160,6 @@ checkResponseTextAccessThrows(xhr);
checkResponseXMLAccessThrows(xhr);
b = xhr.response;
ok(b, "should have a non-null blob");
ok(b instanceof Blob, "should be a Blob");
ok(!(b instanceof File), "should not be a File");
is(b.size, "hello pass\n".length, "wrong blob size");
var fr = new FileReader();