mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
f468c29a62
- hState() in iframe fails when reloading with CTRL+F5, r=bz (2afcd259da) - Bug 1207137 - Add an error code for weak crypto override. r=bz (27b270707b) - Bug 1170488 - Add browser_multiple_pushState.js regression test. r=smaug (157672edb9) - Bug 1206879 - fire onlocationchange from pushState in frames when the URI changes, r=smaug (deb2b21372) - Bug 1200119 - Add a way to create usable markers from different threads, r=tromey (530f3a5eba) - fix include (4c9ffeff29) - Bug 1202657 - Add markers for workers' message passing and serialization/deserialization, r=smaug, jsantell, tromey, ejpbruel (4b911a9422) - Bug 1160307 - capture async stack frames on Javascript timeline markers. r=fitzgen, r=smaug r=Paolo (04a700e4d1) - fix linux toolbar icons (ffd49a4dff) - partial revert or Mac won't package (cbdaa8382d) - fix most icons on Mac except download (07c700aa76) - Bug 718637 - Notify that the document is loaded. r=MarcoZ (7b35f20bef) - Bug 1177640 - [Mac] Do not expose HTML table semantics for "layout" tables. r=surkov (8c898e78a3) - Bug 1210023 - Fix accessibilityAttributeValue for NSAccessibilityIndexAttribute. r=surkov (6aac88d16f) - Bug 1178272 - Move table semantics to a separate mozTableAccessible.mm file. r=surkov (0ee62ef8e8) - cleanup trailing spaces (9f53855fbd) - bug 1213402 - separate value change events into text value changes and numeric value changes r=davidb (c94cc113ad) - bug 1213402 - Fire numeric value change events for proxies r=davidb (cb58d2b126) - Bug 1213382 - proxy more accessible selection methods, r=tbsaunde (68f9f6ef57) - bug 1170049 - check if document tree is correct before cleaning it upr=lsocks (d92ae58a5c) - bug 1185550 - Make sure to correctly handle invalid RecvBindChildDoc and PDocAccessibleConstructor messages from the child process r=lsocks (f70e1b0d1a) - bug 1185726 - avoid killing the child process when it sends the parent events with bad IDs r=lsocks (9447b7c6d7) - bug 1185726 - follow up to deal with -Wunused warning r=me landing on a CLOSED TREE (3cd4bbb768) - bug 1188415 - add document tree consistancy checks to more message handlers r=davidb (1bc9c578ee) - bug 1194853 - pass the correct interfaces to Proxycreated when creating documents r=davidb (f1748d0892) - bug 1188415 - make CheckDocTree return if the document tree is in a sane state (9a2b452392) - bug 1221551 - unbind child documents before rebinding them r=davidb (06737cdb16) - bug 1204070 - add a little more checking to proxy subtree removal r=davidb (24aca334a6) - bug 1164976 - Make DocAccessibleParent::GetAccessible return itself when appropriate r=davidb (9e88a4fa99) - bug 1207862 - make it possible to traverse down the tree of proxied documents r=davidb (41a684a249) - bug 1209147 - make proxying of Accessible::TakeFocus() async r=davidb (96b8ba4f45) - bug 1186536 - make SerializeTree() use IsOuterDoc() to check if an accessible is an outer doc r=davidb (b661e115f3) - bug 1162543 - IDs not mapping to accessibles shouldn't cause ipc calls to fail r=davidb (7f9ba71016) - bug 1170595 - always use IdToAccessible to convert ids to accessibles r=lsocks (c21659779b) - Bug 1207311 - No need for \!nsAccUtils::MustPrune(acc) in DocAccessibleChild::RecvExtents, r=tbsaunde (69f7ebc23d) - Bug 1100602 - Kill child if accessibility ID is re-used (r=trevor) (9955223c4e) - bug 1213606 - assert that we don't destroy a document's proxy until we destroy all of its children r=davidb (f7ab023489) - bug 1191433 - use ProxyAccessible::AsDoc() in ProxyAccessible::Shutdown() r=lsocks (e6204e7847) - bug 1210447 - fix ProxyAccessible::EmbeddedChildAt() on proxies of outerDocs r=davidb (d5acdc0507) - Bug 1212904 P0 Do not abuse fetch response tainting to create opaqueredirect responses. r=ehsan (36f1f393b6) - Bug 1212904 P3 Make FetchDriver look for the channel Tainting value. r=ehsan (037227c5a8) - Bug 1212904 P4 Set channel tainting in FetchEvent.respondWith(). r=ehsan (8fcd1f64d6) - Bug 1212904 P5 Make XHR respect channel tainting. r=ehsan r=sicking (ea03564fde) - Bug 1204596 - Part 1: Avoid overriding the channel final URI when it gets intercepted; r=nsm,bkelly (da18cfd294) - Bug 1204596 - Part 2: Update the schema of the DOM Cache database to remove the response_redirected and response_redirected_url columns; r=bkelly (eabaae5330) - Bug 1204596 - Part 3: Store the responses with manual redirect in the tests added for bug 1164397; r=bkelly (8996f84c1c) - Bug 1204596 - Part 4: Disable test_fetch_cors.html on b2g; r=bkelly (eb0a61aae1) - Bug 1212904 P6 Check for CORS response type in fetch mochitests. r=sicking (157b516434) - Bug 1212904 P7 Verify xhr respects service worker CORS tainting. r=ehsan (e6f347d6d3) - Bug 1217501 P1 Expose Accept and Accept-Language to service worker FetchEvent.request. r=mcmanus (07722f151e) - Bug 1217501 P2 Send */* for fetch() default Accept header. r=ehsan (2bc362d107) - Bug 1130803 - Use non-blocking input for Fetch synthetization pipe, r=bkelly,ehsan (f926b74fed)
139 lines
3.7 KiB
C++
139 lines
3.7 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "mozilla/dom/ChannelInfo.h"
|
|
#include "nsCOMPtr.h"
|
|
#include "nsContentUtils.h"
|
|
#include "nsIChannel.h"
|
|
#include "nsIDocument.h"
|
|
#include "nsIHttpChannel.h"
|
|
#include "nsSerializationHelper.h"
|
|
#include "mozilla/net/HttpBaseChannel.h"
|
|
#include "mozilla/ipc/ChannelInfo.h"
|
|
#include "nsIJARChannel.h"
|
|
#include "nsJARChannel.h"
|
|
#include "nsNetUtil.h"
|
|
|
|
using namespace mozilla;
|
|
using namespace mozilla::dom;
|
|
|
|
void
|
|
ChannelInfo::InitFromDocument(nsIDocument* aDoc)
|
|
{
|
|
MOZ_ASSERT(NS_IsMainThread());
|
|
MOZ_ASSERT(!mInited, "Cannot initialize the object twice");
|
|
|
|
nsCOMPtr<nsISupports> securityInfo = aDoc->GetSecurityInfo();
|
|
if (securityInfo) {
|
|
SetSecurityInfo(securityInfo);
|
|
}
|
|
|
|
mInited = true;
|
|
}
|
|
|
|
void
|
|
ChannelInfo::InitFromChannel(nsIChannel* aChannel)
|
|
{
|
|
MOZ_ASSERT(NS_IsMainThread());
|
|
MOZ_ASSERT(!mInited, "Cannot initialize the object twice");
|
|
|
|
nsCOMPtr<nsISupports> securityInfo;
|
|
aChannel->GetSecurityInfo(getter_AddRefs(securityInfo));
|
|
if (securityInfo) {
|
|
SetSecurityInfo(securityInfo);
|
|
}
|
|
|
|
mInited = true;
|
|
}
|
|
|
|
void
|
|
ChannelInfo::InitFromChromeGlobal(nsIGlobalObject* aGlobal)
|
|
{
|
|
MOZ_ASSERT(!mInited, "Cannot initialize the object twice");
|
|
MOZ_ASSERT(aGlobal);
|
|
|
|
MOZ_RELEASE_ASSERT(
|
|
nsContentUtils::IsSystemPrincipal(aGlobal->PrincipalOrNull()));
|
|
|
|
mSecurityInfo.Truncate();
|
|
mInited = true;
|
|
}
|
|
|
|
void
|
|
ChannelInfo::InitFromIPCChannelInfo(const mozilla::ipc::IPCChannelInfo& aChannelInfo)
|
|
{
|
|
MOZ_ASSERT(!mInited, "Cannot initialize the object twice");
|
|
|
|
mSecurityInfo = aChannelInfo.securityInfo();
|
|
|
|
mInited = true;
|
|
}
|
|
|
|
void
|
|
ChannelInfo::SetSecurityInfo(nsISupports* aSecurityInfo)
|
|
{
|
|
MOZ_ASSERT(mSecurityInfo.IsEmpty(), "security info should only be set once");
|
|
nsCOMPtr<nsISerializable> serializable = do_QueryInterface(aSecurityInfo);
|
|
if (!serializable) {
|
|
NS_WARNING("A non-serializable object was passed to InternalResponse::SetSecurityInfo");
|
|
return;
|
|
}
|
|
NS_SerializeToString(serializable, mSecurityInfo);
|
|
}
|
|
|
|
nsresult
|
|
ChannelInfo::ResurrectInfoOnChannel(nsIChannel* aChannel)
|
|
{
|
|
MOZ_ASSERT(NS_IsMainThread());
|
|
MOZ_ASSERT(mInited);
|
|
|
|
// These pointers may be null at this point. They must be checked before
|
|
// being dereferenced.
|
|
nsCOMPtr<nsIHttpChannel> httpChannel =
|
|
do_QueryInterface(aChannel);
|
|
nsCOMPtr<nsIJARChannel> jarChannel =
|
|
do_QueryInterface(aChannel);
|
|
|
|
if (!mSecurityInfo.IsEmpty()) {
|
|
nsCOMPtr<nsISupports> infoObj;
|
|
nsresult rv = NS_DeserializeObject(mSecurityInfo, getter_AddRefs(infoObj));
|
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
return rv;
|
|
}
|
|
if (httpChannel) {
|
|
net::HttpBaseChannel* httpBaseChannel =
|
|
static_cast<net::HttpBaseChannel*>(httpChannel.get());
|
|
rv = httpBaseChannel->OverrideSecurityInfo(infoObj);
|
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
return rv;
|
|
}
|
|
} else {
|
|
if (NS_WARN_IF(!jarChannel)) {
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
static_cast<nsJARChannel*>(jarChannel.get())->
|
|
OverrideSecurityInfo(infoObj);
|
|
}
|
|
}
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
mozilla::ipc::IPCChannelInfo
|
|
ChannelInfo::AsIPCChannelInfo() const
|
|
{
|
|
// This may be called when mInited is false, for example if we try to store
|
|
// a synthesized Response object into the Cache. Uninitialized and empty
|
|
// ChannelInfo objects are indistinguishable at the IPC level, so this is
|
|
// fine.
|
|
|
|
IPCChannelInfo ipcInfo;
|
|
|
|
ipcInfo.securityInfo() = mSecurityInfo;
|
|
|
|
return ipcInfo;
|
|
}
|