Backed out changeset 8164fe57ac92 (bug 1010434) for bustage.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2014-05-30 16:06:03 -04:00
Родитель 1a87d43ea5
Коммит bbea47dc83
8 изменённых файлов: 29 добавлений и 50 удалений

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

@ -375,11 +375,8 @@ nsJARChannel::LookupFile()
// Open file on parent: OnRemoteFileOpenComplete called when done
nsCOMPtr<nsITabChild> tabChild;
NS_QueryNotificationCallbacks(this, tabChild);
nsCOMPtr<nsILoadContext> loadContext;
NS_QueryNotificationCallbacks(this, loadContext);
rv = remoteFile->AsyncRemoteFileOpen(PR_RDONLY, this, tabChild,
loadContext);
NS_QueryNotificationCallbacks(mCallbacks, mLoadGroup, tabChild);
rv = remoteFile->AsyncRemoteFileOpen(PR_RDONLY, this, tabChild.get());
NS_ENSURE_SUCCESS(rv, rv);
}
}

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

@ -269,9 +269,7 @@ NeckoChild::DeallocPDNSRequestChild(PDNSRequestChild* aChild)
}
PRemoteOpenFileChild*
NeckoChild::AllocPRemoteOpenFileChild(const SerializedLoadContext& aSerialized,
const URIParams&,
const OptionalURIParams&)
NeckoChild::AllocPRemoteOpenFileChild(const URIParams&, const OptionalURIParams&)
{
// We don't allocate here: instead we always use IPDL constructor that takes
// an existing RemoteOpenFileChild

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

@ -57,8 +57,7 @@ protected:
const uint32_t& aFlags) MOZ_OVERRIDE;
virtual bool DeallocPDNSRequestChild(PDNSRequestChild*) MOZ_OVERRIDE;
virtual PRemoteOpenFileChild*
AllocPRemoteOpenFileChild(const SerializedLoadContext& aSerialized,
const URIParams&,
AllocPRemoteOpenFileChild(const URIParams&,
const OptionalURIParams&) MOZ_OVERRIDE;
virtual bool DeallocPRemoteOpenFileChild(PRemoteOpenFileChild*) MOZ_OVERRIDE;
virtual PRtspControllerChild* AllocPRtspControllerChild() MOZ_OVERRIDE;

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

@ -500,8 +500,7 @@ NeckoParent::DeallocPDNSRequestParent(PDNSRequestParent* aParent)
}
PRemoteOpenFileParent*
NeckoParent::AllocPRemoteOpenFileParent(const SerializedLoadContext& aSerialized,
const URIParams& aURI,
NeckoParent::AllocPRemoteOpenFileParent(const URIParams& aURI,
const OptionalURIParams& aAppURI)
{
nsCOMPtr<nsIURI> uri = DeserializeURI(aURI);
@ -524,21 +523,17 @@ NeckoParent::AllocPRemoteOpenFileParent(const SerializedLoadContext& aSerialized
nsRefPtr<TabParent> tabParent =
static_cast<TabParent*>(Manager()->ManagedPBrowserParent()[i]);
uint32_t appId = tabParent->OwnOrContainingAppId();
// Note: this enforces that SerializedLoadContext.appID is one of the apps
// in the child process, but there's currently no way to verify the
// request is not from a different app in that process.
if (appId == aSerialized.mAppId) {
nsresult rv = appsService->GetAppByLocalId(appId, getter_AddRefs(mozApp));
if (NS_FAILED(rv) || !mozApp) {
break;
}
rv = mozApp->HasPermission("webapps-manage", &hasManage);
if (NS_FAILED(rv)) {
break;
}
haveValidBrowser = true;
break;
nsresult rv = appsService->GetAppByLocalId(appId, getter_AddRefs(mozApp));
if (NS_FAILED(rv) || !mozApp) {
continue;
}
hasManage = false;
rv = mozApp->HasPermission("webapps-manage", &hasManage);
if (NS_FAILED(rv)) {
continue;
}
haveValidBrowser = true;
break;
}
if (!haveValidBrowser) {
@ -626,11 +621,9 @@ NeckoParent::AllocPRemoteOpenFileParent(const SerializedLoadContext& aSerialized
}
bool
NeckoParent::RecvPRemoteOpenFileConstructor(
PRemoteOpenFileParent* aActor,
const SerializedLoadContext& aSerialized,
const URIParams& aFileURI,
const OptionalURIParams& aAppURI)
NeckoParent::RecvPRemoteOpenFileConstructor(PRemoteOpenFileParent* aActor,
const URIParams& aFileURI,
const OptionalURIParams& aAppURI)
{
return static_cast<RemoteOpenFileParent*>(aActor)->OpenSendCloseDelete();
}

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

@ -100,16 +100,13 @@ protected:
virtual bool DeallocPWebSocketParent(PWebSocketParent*) MOZ_OVERRIDE;
virtual PTCPSocketParent* AllocPTCPSocketParent() MOZ_OVERRIDE;
virtual PRemoteOpenFileParent*
AllocPRemoteOpenFileParent(const SerializedLoadContext& aSerialized,
const URIParams& aFileURI,
const OptionalURIParams& aAppURI) MOZ_OVERRIDE;
virtual bool
RecvPRemoteOpenFileConstructor(PRemoteOpenFileParent* aActor,
const SerializedLoadContext& aSerialized,
const URIParams& aFileURI,
const OptionalURIParams& aAppURI)
MOZ_OVERRIDE;
virtual PRemoteOpenFileParent* AllocPRemoteOpenFileParent(const URIParams& aFileURI,
const OptionalURIParams& aAppURI)
MOZ_OVERRIDE;
virtual bool RecvPRemoteOpenFileConstructor(PRemoteOpenFileParent* aActor,
const URIParams& aFileURI,
const OptionalURIParams& aAppURI)
MOZ_OVERRIDE;
virtual bool DeallocPRemoteOpenFileParent(PRemoteOpenFileParent* aActor)
MOZ_OVERRIDE;

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

@ -68,9 +68,7 @@ parent:
PDNSRequest(nsCString hostName, uint32_t flags);
PRemoteOpenFile(SerializedLoadContext loadContext,
URIParams fileuri,
OptionalURIParams appuri);
PRemoteOpenFile(URIParams fileuri, OptionalURIParams appuri);
HTMLDNSPrefetch(nsString hostname, uint16_t flags);
CancelHTMLDNSPrefetch(nsString hostname, uint16_t flags, nsresult reason);

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

@ -175,8 +175,7 @@ RemoteOpenFileChild::Init(nsIURI* aRemoteOpenUri, nsIURI* aAppUri)
nsresult
RemoteOpenFileChild::AsyncRemoteFileOpen(int32_t aFlags,
nsIRemoteOpenFileListener* aListener,
nsITabChild* aTabChild,
nsILoadContext *aLoadContext)
nsITabChild* aTabChild)
{
if (!mFile) {
return NS_ERROR_NOT_INITIALIZED;
@ -228,8 +227,7 @@ RemoteOpenFileChild::AsyncRemoteFileOpen(int32_t aFlags,
OptionalURIParams appUri;
SerializeURI(mAppURI, appUri);
IPC::SerializedLoadContext loadContext(aLoadContext);
gNeckoChild->SendPRemoteOpenFileConstructor(this, loadContext, uri, appUri);
gNeckoChild->SendPRemoteOpenFileConstructor(this, uri, appUri);
// The chrome process now has a logical ref to us until it calls Send__delete.
AddIPDLReference();

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

@ -72,8 +72,7 @@ public:
// Note: currently only PR_RDONLY is supported for 'flags'
nsresult AsyncRemoteFileOpen(int32_t aFlags,
nsIRemoteOpenFileListener* aListener,
nsITabChild* aTabChild,
nsILoadContext *aLoadContext);
nsITabChild* aTabChild);
void ReleaseIPDLReference()
{