Bug 1394349 - Label dom::SimpleTextTrackEvent with its associated inner window. r=billm

This commit is contained in:
Bevis Tseng 2017-08-28 17:22:20 +08:00
Родитель 94ba01b62f
Коммит 5652aa4c4a
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -505,6 +505,14 @@ public:
return NS_OK;
}
void Dispatch() {
if (nsCOMPtr<nsIGlobalObject> global = mCue->GetOwnerGlobal()) {
global->Dispatch(TaskCategory::Other, do_AddRef(this));
} else {
NS_DispatchToMainThread(do_AddRef(this));
}
}
private:
nsString mName;
double mTime;
@ -850,7 +858,7 @@ TextTrackManager::TimeMarchesOn()
// Fire the eventList
for (uint32_t i = 0; i < eventList.Length(); ++i) {
NS_DispatchToMainThread(eventList[i].forget());
eventList[i]->Dispatch();
}
// Step 16.