зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1301091
- Make FlyWeb not use gNeckoParent. Fix WebSocketChannel handling of incoming requests to server-websocket. r=billm r=michal
This commit is contained in:
Родитель
28b6a770e1
Коммит
df8950c7af
|
@ -541,9 +541,15 @@ FlyWebPublishedServerParent::HandleEvent(nsIDOMEvent* aEvent)
|
|||
uint64_t id = mNextRequestId++;
|
||||
mPendingRequests.Put(id, request);
|
||||
|
||||
nsTArray<PNeckoParent*> neckoParents;
|
||||
Manager()->ManagedPNeckoParent(neckoParents);
|
||||
if (neckoParents.Length() != 1) {
|
||||
MOZ_CRASH("Expected exactly 1 PNeckoParent instance per PNeckoChild");
|
||||
}
|
||||
|
||||
RefPtr<TransportProviderParent> provider =
|
||||
static_cast<TransportProviderParent*>(
|
||||
mozilla::net::gNeckoParent->SendPTransportProviderConstructor());
|
||||
neckoParents[0]->SendPTransportProviderConstructor());
|
||||
|
||||
IPCInternalRequest ipcReq;
|
||||
request->ToIPC(&ipcReq);
|
||||
|
|
|
@ -85,12 +85,19 @@ WebSocketChannelParent::RecvAsyncOpen(const OptionalURIParams& aURI,
|
|||
goto fail;
|
||||
}
|
||||
|
||||
rv = loadInfo->GetOriginAttributes(&attrs);
|
||||
if (NS_FAILED(rv)) {
|
||||
goto fail;
|
||||
}
|
||||
if (loadInfo) {
|
||||
rv = loadInfo->GetOriginAttributes(&attrs);
|
||||
if (NS_FAILED(rv)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
appId = attrs.mAppId;
|
||||
appId = attrs.mAppId;
|
||||
} else {
|
||||
// If the WebSocket is a server-side socket, then
|
||||
// loadInfo will be null (since it's an incoming connection).
|
||||
// AppID is irrelevant in these circumstances.
|
||||
appId = NECKO_UNKNOWN_APP_ID;
|
||||
}
|
||||
if (appId != NECKO_UNKNOWN_APP_ID &&
|
||||
appId != NECKO_NO_APP_ID) {
|
||||
gIOService->IsAppOffline(appId, &appOffline);
|
||||
|
|
Загрузка…
Ссылка в новой задаче