зеркало из https://github.com/mozilla/gecko-dev.git
Bug 890570 - PTCPSocket constructor doesn't need PBrowser r=jduell
This commit is contained in:
Родитель
57fc161ffb
Коммит
502ede1da3
|
@ -6,7 +6,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
include protocol PNecko;
|
||||
include protocol PBrowser;
|
||||
|
||||
include "mozilla/net/NeckoMessageUtils.h";
|
||||
|
||||
|
@ -36,8 +35,7 @@ protocol PTCPSocket
|
|||
manager PNecko;
|
||||
|
||||
parent:
|
||||
Open(nsString host, uint16_t port, bool useSSL, nsString binaryType,
|
||||
nullable PBrowser browser);
|
||||
Open(nsString host, uint16_t port, bool useSSL, nsString binaryType);
|
||||
Data(SendableData data);
|
||||
Suspend();
|
||||
Resume();
|
||||
|
|
|
@ -91,8 +91,7 @@ TCPSocketChild::Open(nsITCPSocketInternal* aSocket, const nsAString& aHost,
|
|||
}
|
||||
AddIPDLReference();
|
||||
gNeckoChild->SendPTCPSocketConstructor(this);
|
||||
SendOpen(nsString(aHost), aPort, aUseSSL, nsString(aBinaryType),
|
||||
GetTabChildFrom(aWindow));
|
||||
SendOpen(nsString(aHost), aPort, aUseSSL, nsString(aBinaryType));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include "nsCxPusher.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "mozilla/AppProcessChecker.h"
|
||||
#include "mozilla/net/NeckoCommon.h"
|
||||
#include "mozilla/net/PNeckoParent.h"
|
||||
|
||||
namespace IPC {
|
||||
|
||||
|
@ -80,11 +82,12 @@ NS_IMETHODIMP_(nsrefcnt) TCPSocketParent::Release(void)
|
|||
|
||||
bool
|
||||
TCPSocketParent::RecvOpen(const nsString& aHost, const uint16_t& aPort, const bool& aUseSSL,
|
||||
const nsString& aBinaryType, PBrowserParent* aBrowser)
|
||||
const nsString& aBinaryType)
|
||||
{
|
||||
// We don't have browser actors in xpcshell, and hence can't run automated
|
||||
// tests without this loophole.
|
||||
if (aBrowser && !AssertAppProcessPermission(aBrowser, "tcp-socket")) {
|
||||
if (net::UsingNeckoIPCSecurity() &&
|
||||
!AssertAppProcessPermission(Manager()->Manager(), "tcp-socket")) {
|
||||
FireInteralError(this, __LINE__);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -47,8 +47,7 @@ public:
|
|||
TCPSocketParent() : mIntermediaryObj(nullptr) {}
|
||||
|
||||
virtual bool RecvOpen(const nsString& aHost, const uint16_t& aPort,
|
||||
const bool& useSSL, const nsString& aBinaryType,
|
||||
PBrowserParent* aBrowser);
|
||||
const bool& useSSL, const nsString& aBinaryType);
|
||||
|
||||
virtual bool RecvSuspend() MOZ_OVERRIDE;
|
||||
virtual bool RecvResume() MOZ_OVERRIDE;
|
||||
|
|
|
@ -86,7 +86,7 @@ protected:
|
|||
virtual PWebSocketParent* AllocPWebSocketParent(PBrowserParent* browser,
|
||||
const SerializedLoadContext& aSerialized);
|
||||
virtual bool DeallocPWebSocketParent(PWebSocketParent*);
|
||||
virtual PTCPSocketParent* AllocPTCPSocketParent();
|
||||
virtual PTCPSocketParent* AllocPTCPSocketParent();
|
||||
|
||||
virtual PRemoteOpenFileParent* AllocPRemoteOpenFileParent(const URIParams& aFileURI,
|
||||
PBrowserParent* aBrowser)
|
||||
|
|
Загрузка…
Ссылка в новой задаче