зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1610585 - MessagePortIdentifierRunnable ensure balanced busy count modifications r=dom-workers-and-storage-reviewers,asuth
If the MessagePortIdentifierRunnable's WorkerRunnable::Run is called when the WorkerPrivate is doing ClearMainEventQueue, WorkerRunnable::Run will decrement the busy count. It should have already been incremented by a (successful) WorkerRunnable::PreDispatch though, but MessagePortIdentifierRunnable's PreDispatch doesn't do anything, so in this case the busy count modifications are not balanced. It seemed like MessagePortIdentifierRunnable tried to avoid modifying the busy count at all, but it doesn't work in the case described above. So, the patch just makes MessagePortIdentifierRunnable do the normal busy count modifications. (I also don't see any "bad assertions" referenced by the empty {Pre,Post}{Dispatch,Run} methods.) Differential Revision: https://phabricator.services.mozilla.com/D62951 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a03927102e
Коммит
6b83dd0bdd
|
@ -144,33 +144,11 @@ class MessagePortIdentifierRunnable final : public WorkerRunnable {
|
|||
mPortIdentifier(aPortIdentifier) {}
|
||||
|
||||
private:
|
||||
virtual bool WorkerRun(JSContext* aCx,
|
||||
WorkerPrivate* aWorkerPrivate) override {
|
||||
bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override {
|
||||
mActor->AddPortIdentifier(aCx, aWorkerPrivate, mPortIdentifier);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool PreDispatch(WorkerPrivate* aWorkerPrivate) override {
|
||||
// Silence bad assertions.
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void PostDispatch(WorkerPrivate* aWorkerPrivate,
|
||||
bool aDispatchResult) override {
|
||||
// Silence bad assertions.
|
||||
}
|
||||
|
||||
bool PreRun(WorkerPrivate* aWorkerPrivate) override {
|
||||
// Silence bad assertions.
|
||||
return true;
|
||||
}
|
||||
|
||||
void PostRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate,
|
||||
bool aRunResult) override {
|
||||
// Silence bad assertions.
|
||||
return;
|
||||
}
|
||||
|
||||
SelfHolder mActor;
|
||||
UniqueMessagePortId mPortIdentifier;
|
||||
};
|
||||
|
|
|
@ -108,7 +108,6 @@ support-files =
|
|||
[test_blobConstructor.html]
|
||||
[test_blobWorkers.html]
|
||||
[test_bug949946.html]
|
||||
skip-if = debug && ((android_version == '24') || (os == "linux" && bits == 64) || (os == "win" && bits == 32) || (os == "mac")) #crashes Bug 1564700
|
||||
[test_bug978260.html]
|
||||
[test_bug998474.html]
|
||||
[test_bug1002702.html]
|
||||
|
|
Загрузка…
Ссылка в новой задаче