mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1215508: Fix the race in accessing the unopened IPC channels in TabChild::PreloadSlowThings(). r=khuey
This commit is contained in:
parent
578ca2a77a
commit
eabbe039ec
@ -510,16 +510,8 @@ private:
|
||||
content->GetIPCChannel()->Unblock();
|
||||
}
|
||||
|
||||
nsTArray<IToplevelProtocol*> actors;
|
||||
content->GetOpenedActors(actors);
|
||||
for (size_t j = 0; j < actors.Length(); j++) {
|
||||
IToplevelProtocol* actor = actors[j];
|
||||
if (aBlock) {
|
||||
actor->GetIPCChannel()->Block();
|
||||
} else {
|
||||
actor->GetIPCChannel()->Unblock();
|
||||
}
|
||||
}
|
||||
// Other IPC channels do not perform the checks through Block() and
|
||||
// Unblock().
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
@ -177,10 +177,12 @@ class MessageChannel : HasResultCodes
|
||||
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
void Block() {
|
||||
MOZ_ASSERT(mLink);
|
||||
mLink->Block();
|
||||
}
|
||||
|
||||
void Unblock() {
|
||||
MOZ_ASSERT(mLink);
|
||||
mLink->Unblock();
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user