Backed out 7 changesets (bug 1047483, bug 1079301, bug 1079335) for webplatform test failures.

Backed out changeset 7d06b68c44d0 (bug 1079335)
Backed out changeset 92030169528e (bug 1079301)
Backed out changeset c09d7f95554a (bug 1047483)
Backed out changeset c199f1057d7e (bug 1047483)
Backed out changeset 18830d07884c (bug 1047483)
Backed out changeset e087289ccfbb (bug 1047483)
Backed out changeset 6238ff5d3ed0 (bug 1047483)

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen
2014-10-07 13:16:11 -04:00
parent c407297fcb
commit ac4e3f2f99
180 changed files with 3915 additions and 3417 deletions

View File

@@ -10,12 +10,12 @@
#include "DOMError.h"
#include "mozilla/Preferences.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/FileSystemBase.h"
#include "mozilla/dom/FileSystemUtils.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/ipc/BlobParent.h"
#include "nsDOMFile.h"
#include "nsIFile.h"
#include "nsNetUtil.h"
#include "nsStringGlue.h"
@@ -27,7 +27,7 @@ uint32_t CreateFileTask::sOutputBufferSize = 0;
CreateFileTask::CreateFileTask(FileSystemBase* aFileSystem,
const nsAString& aPath,
File* aBlobData,
nsIDOMBlob* aBlobData,
InfallibleTArray<uint8_t>& aArrayData,
bool replace,
ErrorResult& aRv)
@@ -79,10 +79,9 @@ CreateFileTask::CreateFileTask(FileSystemBase* aFileSystem,
}
BlobParent* bp = static_cast<BlobParent*>(static_cast<PBlobParent*>(data));
nsRefPtr<FileImpl> blobImpl = bp->GetBlobImpl();
MOZ_ASSERT(blobImpl, "blobData should not be null.");
nsresult rv = blobImpl->GetInternalStream(getter_AddRefs(mBlobStream));
nsCOMPtr<nsIDOMBlob> blobData = bp->GetBlob();
MOZ_ASSERT(blobData, "blobData should not be null.");
nsresult rv = blobData->GetInternalStream(getter_AddRefs(mBlobStream));
NS_WARN_IF(NS_FAILED(rv));
}
@@ -127,8 +126,7 @@ FileSystemResponseValue
CreateFileTask::GetSuccessRequestResult() const
{
MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
nsRefPtr<File> file = new File(mFileSystem->GetWindow(),
mTargetFileImpl);
nsRefPtr<DOMFile> file = new DOMFile(mTargetFileImpl);
BlobParent* actor = GetBlobParent(file);
if (!actor) {
return FileSystemErrorResponse(NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR);
@@ -144,7 +142,8 @@ CreateFileTask::SetSuccessRequestResult(const FileSystemResponseValue& aValue)
MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
FileSystemFileResponse r = aValue;
BlobChild* actor = static_cast<BlobChild*>(r.blobChild());
mTargetFileImpl = actor->GetBlobImpl();
nsCOMPtr<nsIDOMBlob> blob = actor->GetBlob();
mTargetFileImpl = static_cast<DOMFile*>(blob.get())->Impl();
}
nsresult
@@ -261,7 +260,7 @@ CreateFileTask::Work()
return NS_ERROR_FAILURE;
}
mTargetFileImpl = new FileImplFile(file);
mTargetFileImpl = new DOMFileImplFile(file);
return NS_OK;
}
@@ -280,7 +279,7 @@ CreateFileTask::Work()
return NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR;
}
mTargetFileImpl = new FileImplFile(file);
mTargetFileImpl = new DOMFileImplFile(file);
return NS_OK;
}
@@ -303,7 +302,7 @@ CreateFileTask::HandlerCallback()
return;
}
nsCOMPtr<nsIDOMFile> file = new File(mFileSystem->GetWindow(), mTargetFileImpl);
nsCOMPtr<nsIDOMFile> file = new DOMFile(mTargetFileImpl);
mPromise->MaybeResolve(file);
mPromise = nullptr;
mBlobData = nullptr;