Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
Back out 9fc0e6867256, 6947bbce9672, fb91a23bd158, a5870dd2ad7c, c3d3…
Browse files Browse the repository at this point in the history
…292fbd1e, 42f2aca1fde9 to fix Android failures on a CLOSED TREE
  • Loading branch information
mbrubeck committed Jul 1, 2011
1 parent 77cec7b commit cf95fb5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 56 deletions.
8 changes: 4 additions & 4 deletions client.mk
@@ -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
#
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
16 changes: 3 additions & 13 deletions configure.in
Expand Up @@ -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])
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions content/base/public/nsDOMFile.h
Expand Up @@ -72,10 +72,8 @@ class nsDOMFile : public nsIDOMFile,
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)
{}
Expand All @@ -88,7 +86,6 @@ class nsDOMFile : public nsIDOMFile,
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),
Expand All @@ -115,7 +112,6 @@ class nsDOMFile : public nsIDOMFile,

protected:
nsCOMPtr<nsIFile> mFile;
nsCOMPtr<nsISupports> mCacheToken;

// start and length in
PRUint64 mStart;
Expand Down
36 changes: 4 additions & 32 deletions content/base/src/nsXMLHttpRequest.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 0 additions & 2 deletions content/base/test/test_XHR.html
Expand Up @@ -160,8 +160,6 @@
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();
Expand Down

0 comments on commit cf95fb5

Please sign in to comment.