记录下blink 57的BlinkPlatformImpl等流程

xiaoxiao2021-02-28  123

渲染进程的RendererBlinkPlatformImpl继承了BlinkPlatformImpl, 在RendererBlinkPlatformImpl::currentThread里

如果是渲染主线程,会返回main_thread_,这玩意是blink::scheduler::RendererScheduler::CreateMainThread。

RendererSchedulerImpl::CreateMainThread里

会把WebThreadImplForRendererScheduler这个渲染调度器创建出来。

所以可以看到,如果是渲染主线程,在BlinkPlatformImpl::currentThread::scheduler返回的是WebThreadImplForRendererScheduler,

如果是js worker这种,BlinkPlatformImpl::currentThread::scheduler返回的是

blink::scheduler::WebThreadImplForWorkerScheduler调度器。这个是BlinkPlatformImpl::createThread里出来的

转载请注明原文地址: https://www.6miu.com/read-70614.html

最新回复(0)