Bug 1867358 part 1: Fix up unbraced single-line if-statements in NotificationController and its superclass. r=eeejay
This patch has no functional change; it's just some trivial fixups to align with with Mozilla C++ coding style. Differential Revision: https://phabricator.services.mozilla.com/D195040
This commit is contained in:
@@ -42,7 +42,9 @@ NotificationController::NotificationController(DocAccessible* aDocument,
|
||||
|
||||
NotificationController::~NotificationController() {
|
||||
NS_ASSERTION(!mDocument, "Controller wasn't shutdown properly!");
|
||||
if (mDocument) Shutdown();
|
||||
if (mDocument) {
|
||||
Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -54,7 +56,9 @@ NS_IMPL_CYCLE_COLLECTING_NATIVE_RELEASE(NotificationController)
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(NotificationController)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(NotificationController)
|
||||
if (tmp->mDocument) tmp->Shutdown();
|
||||
if (tmp->mDocument) {
|
||||
tmp->Shutdown();
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(NotificationController)
|
||||
@@ -856,7 +860,9 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
|
||||
nsTArray<RefPtr<DocAccessible>> newChildDocs;
|
||||
for (uint32_t idx = 0; idx < hangingDocCnt; idx++) {
|
||||
DocAccessible* childDoc = mHangingChildDocuments[idx];
|
||||
if (childDoc->IsDefunct()) continue;
|
||||
if (childDoc->IsDefunct()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IPCAccessibilityActive() && !mDocument->IPCDoc()) {
|
||||
childDoc->Shutdown();
|
||||
@@ -895,12 +901,16 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
|
||||
uint32_t childDocCnt = mDocument->ChildDocumentCount(), childDocIdx = 0;
|
||||
for (; childDocIdx < childDocCnt; childDocIdx++) {
|
||||
DocAccessible* childDoc = mDocument->GetChildDocumentAt(childDocIdx);
|
||||
if (!childDoc->HasLoadState(DocAccessible::eCompletelyLoaded)) break;
|
||||
if (!childDoc->HasLoadState(DocAccessible::eCompletelyLoaded)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (childDocIdx == childDocCnt) {
|
||||
mDocument->ProcessLoad();
|
||||
if (!mDocument) return;
|
||||
if (!mDocument) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -930,7 +940,9 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
|
||||
uint32_t notificationCount = notifications.Length();
|
||||
for (uint32_t idx = 0; idx < notificationCount; idx++) {
|
||||
notifications[idx]->Process();
|
||||
if (!mDocument) return;
|
||||
if (!mDocument) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ipc::ProcessChild::ExpectingShutdown()) {
|
||||
@@ -1010,7 +1022,9 @@ void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
|
||||
}
|
||||
|
||||
mObservingState = eRefreshObserving;
|
||||
if (!mDocument) return;
|
||||
if (!mDocument) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop further processing if there are no new notifications of any kind or
|
||||
// events and document load is processed.
|
||||
|
||||
Reference in New Issue
Block a user