зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1398393 - Set Servo thread state on cooperative threads. r=billm
By doing this we avoid triggering assertions in the Servo code that ensure we have registered the thread with Servo and set the proper state on it. MozReview-Commit-ID: K6qHrYoQDLm --HG-- extra : rebase_source : d01b0aad42273f6b92b7cfd5f5fe17ffe7b4cda0
This commit is contained in:
Родитель
9ff55b4d26
Коммит
04b86e2150
|
@ -549,6 +549,8 @@ SERVO_BINDING_FUNC(Servo_ComputedValues_GetStyleRuleList, void,
|
|||
// Initialize Servo components. Should be called exactly once at startup.
|
||||
SERVO_BINDING_FUNC(Servo_Initialize, void,
|
||||
RawGeckoURLExtraData* dummy_url_data)
|
||||
// Initialize Servo on a cooperative Quantum DOM thread.
|
||||
SERVO_BINDING_FUNC(Servo_InitializeCooperativeThread, void);
|
||||
// Shut down Servo components. Should be called exactly once at shutdown.
|
||||
SERVO_BINDING_FUNC(Servo_Shutdown, void)
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "base/message_loop.h"
|
||||
#include "mozilla/IOInterposer.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "nsError.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
|
|
|
@ -653,6 +653,7 @@ SchedulerImpl::ThreadController::OnStartThread(size_t aIndex, const nsACString&
|
|||
JS_AddInterruptCallback(cx, SchedulerImpl::InterruptCallback);
|
||||
}
|
||||
js::SetCooperativeYieldCallback(cx, SchedulerImpl::YieldCallback);
|
||||
Servo_InitializeCooperativeThread();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче