Remove V8Initializer::MessageHandlerInWorker() reentrant check
When an exception is thrown in workers, ExecutionContext::DispatchErrorEvent() is called [A] From V8Initializer::MessageHandlerInWorker() in some cases and [B] Directly (without MessageHandlerInWorker()) in other cases, which leads calling WorkerGlobalScope.onerror. When an exception is thrown from the WorkerGlobalScope.onerror handler, MessageHandlerInWorker() is called [A] reentrantly from MessageHandlerInWorker(), and [B] not reentrantly. Because MessageHandlerInWorker() contains a reentrant check, a part of unhandled exception handling is skipped only in cases [A], but not in [B]. This CL removes the reentrant check to always perform the unhandled exception handling, thus fixing the behavior of crbug/1112228. Skipping the reentrant check leads calling ExecutionContext::DispatchErrorEvent() from outer ExecutionContext::DispatchErrorEvent(), but DispatchErrorEvent() is already reentrantly called in cases [B], and DispatchErrorEvent() contains its own reentrant handling code. Bug: 1112228, 1111134, 1111750 Change-Id: I87b12ddad3fe082bea3429f8801563d08fc0cd6e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332091 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by:
Kouhei Ueno <kouhei@chromium.org> Reviewed-by:
Kenichi Ishibashi <bashi@chromium.org> Reviewed-by:
Dominic Farolino <dom@chromium.org> Cr-Commit-Position: refs/heads/master@{#795353}
Showing
Please register or sign in to comment