import changes from `dev' branch of rmottola/Arctic-Fox:

- 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)
This commit is contained in:
2022-11-08 14:20:19 +08:00
parent bfcecaee50
commit f468c29a62
124 changed files with 2152 additions and 758 deletions
+57 -28
View File
@@ -839,7 +839,7 @@ nsDocShell::nsDocShell()
nsDocShell::~nsDocShell()
{
MOZ_ASSERT(!IsObserved());
MOZ_ASSERT(!mObserved);
// Avoid notifying observers while we're in the dtor.
mIsBeingDestroyed = true;
@@ -2840,14 +2840,25 @@ NS_IMETHODIMP
nsDocShell::SetRecordProfileTimelineMarkers(bool aValue)
{
bool currentValue = nsIDocShell::GetRecordProfileTimelineMarkers();
if (currentValue != aValue) {
if (aValue) {
TimelineConsumers::AddConsumer(this);
UseEntryScriptProfiling();
} else {
TimelineConsumers::RemoveConsumer(this);
UnuseEntryScriptProfiling();
}
if (currentValue == aValue) {
return NS_OK;
}
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
if (!timelines) {
return NS_OK;
}
if (aValue) {
MOZ_ASSERT(!timelines->HasConsumer(this));
timelines->AddConsumer(this);
MOZ_ASSERT(timelines->HasConsumer(this));
UseEntryScriptProfiling();
} else {
MOZ_ASSERT(timelines->HasConsumer(this));
timelines->RemoveConsumer(this);
MOZ_ASSERT(!timelines->HasConsumer(this));
UnuseEntryScriptProfiling();
}
return NS_OK;
@@ -2856,7 +2867,7 @@ nsDocShell::SetRecordProfileTimelineMarkers(bool aValue)
NS_IMETHODIMP
nsDocShell::GetRecordProfileTimelineMarkers(bool* aValue)
{
*aValue = IsObserved();
*aValue = !!mObserved;
return NS_OK;
}
@@ -2868,7 +2879,7 @@ nsDocShell::PopProfileTimelineMarkers(
nsTArray<dom::ProfileTimelineMarker> store;
SequenceRooter<dom::ProfileTimelineMarker> rooter(aCx, &store);
if (IsObserved()) {
if (mObserved) {
mObserved->PopMarkers(aCx, store);
}
@@ -4782,6 +4793,9 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
if (securityState & nsIWebProgressListener::STATE_USES_SSL_3) {
error.AssignLiteral("sslv3Used");
addHostPort = true;
} else if (securityState & nsIWebProgressListener::STATE_USES_WEAK_CRYPTO) {
error.AssignLiteral("weakCryptoUsed");
addHostPort = true;
} else {
// Usually we should have aFailedChannel and get a detailed message
tsi->GetErrorMessage(getter_Copies(messageStr));
@@ -11155,8 +11169,11 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
aLoadType == LOAD_ERROR_PAGE ||
aLoadType & LOAD_CMD_HISTORY);
// We don't update session history on reload.
bool updateSHistory = updateGHistory && (!(aLoadType & LOAD_CMD_RELOAD));
// We don't update session history on reload unless we're loading
// an iframe in shift-reload case.
bool updateSHistory = updateGHistory &&
(!(aLoadType & LOAD_CMD_RELOAD) ||
(IsForceReloadType(aLoadType) && IsFrame()));
// Create SH Entry (mLSHE) only if there is a SessionHistory object in the
// current frame or in the root docshell.
@@ -11229,9 +11246,9 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
* see bug 90098
*/
if (aChannel && IsForceReloadType(aLoadType)) {
NS_ASSERTION(!updateSHistory,
"We shouldn't be updating session history for forced"
" reloads!");
MOZ_ASSERT(!updateSHistory || IsFrame(),
"We shouldn't be updating session history for forced"
" reloads unless we're in a newly created iframe!");
nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(aChannel));
nsCOMPtr<nsISupports> cacheKey;
@@ -11668,7 +11685,12 @@ nsDocShell::AddState(JS::Handle<JS::Value> aData, const nsAString& aTitle,
// FireOnLocationChange(...) breaks security UI.
if (!equalURIs) {
document->SetDocumentURI(newURI);
SetCurrentURI(newURI, nullptr, true, LOCATION_CHANGE_SAME_DOCUMENT);
// We can't trust SetCurrentURI to do always fire locationchange events
// when we expect it to, so we hack around that by doing it ourselves...
SetCurrentURI(newURI, nullptr, false, LOCATION_CHANGE_SAME_DOCUMENT);
if (mLoadType != LOAD_ERROR_PAGE) {
FireDummyOnLocationChange();
}
AddURIVisit(newURI, oldURI, oldURI, 0);
@@ -13950,28 +13972,35 @@ void
nsDocShell::NotifyJSRunToCompletionStart(const char* aReason,
const char16_t* aFunctionName,
const char16_t* aFilename,
const uint32_t aLineNumber)
const uint32_t aLineNumber,
JS::Handle<JS::Value> aAsyncStack,
JS::Handle<JS::Value> aAsyncCause)
{
bool timelineOn = nsIDocShell::GetRecordProfileTimelineMarkers();
// If first start, mark interval start.
if (timelineOn && mJSRunToCompletionDepth == 0) {
UniquePtr<TimelineMarker> marker = MakeUnique<JavascriptTimelineMarker>(
aReason, aFunctionName, aFilename, aLineNumber, MarkerTracingType::START);
TimelineConsumers::AddMarkerForDocShell(this, Move(marker));
if (mJSRunToCompletionDepth == 0) {
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
if (timelines && timelines->HasConsumer(this)) {
timelines->AddMarkerForDocShell(this, Move(
MakeUnique<JavascriptTimelineMarker>(
aReason, aFunctionName, aFilename, aLineNumber, MarkerTracingType::START,
aAsyncStack, aAsyncCause)));
}
}
mJSRunToCompletionDepth++;
}
void
nsDocShell::NotifyJSRunToCompletionStop()
{
bool timelineOn = nsIDocShell::GetRecordProfileTimelineMarkers();
mJSRunToCompletionDepth--;
// If last stop, mark interval end.
mJSRunToCompletionDepth--;
if (timelineOn && mJSRunToCompletionDepth == 0) {
TimelineConsumers::AddMarkerForDocShell(this, "Javascript", MarkerTracingType::END);
if (mJSRunToCompletionDepth == 0) {
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
if (timelines && timelines->HasConsumer(this)) {
timelines->AddMarkerForDocShell(this, "Javascript", MarkerTracingType::END);
}
}
}