Support ScriptForbiddenScope in workers |
||||
Issue descriptionCurrently ScriptForbiddenScope is working only on the main thread. - ScriptForbiddenScope::Enter can be called only on the main thread. - ScriptForbiddenScope::Exit can be called only on the main thread. - ScriptForbiddenScope::IsScriptForbidden returns false on a non-main thread. I guess ScriptForbiddenScope methods are not so performance sensitive and we can use a thread local storage instead of a global variable.
,
Oct 24 2017
,
Oct 24 2017
+1 to making ScriptForbiddenScope available on other threads.
,
Oct 24 2017
+1 Also +cc:tzik@. I think that it could be an option to make ScriptForbiddenScope per-eventloop as tzik@ is going to refactor event loops / task queues.
,
Oct 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8419e454a81a7e8a625c43caae69d674530f8298 commit 8419e454a81a7e8a625c43caae69d674530f8298 Author: Yutaka Hirano <yhirano@chromium.org> Date: Tue Oct 24 12:05:22 2017 Have ScriptForbiddenScope work in worker threads Bug: 777716 , 731918, 756406 Change-Id: Icce08f48f2d4aaf4580f0124108a8e5b47e33709 Reviewed-on: https://chromium-review.googlesource.com/735279 Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#511104} [modify] https://crrev.com/8419e454a81a7e8a625c43caae69d674530f8298/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp [modify] https://crrev.com/8419e454a81a7e8a625c43caae69d674530f8298/third_party/WebKit/Source/platform/bindings/ScriptForbiddenScope.cpp [modify] https://crrev.com/8419e454a81a7e8a625c43caae69d674530f8298/third_party/WebKit/Source/platform/bindings/ScriptForbiddenScope.h [modify] https://crrev.com/8419e454a81a7e8a625c43caae69d674530f8298/third_party/WebKit/Source/platform/heap/HeapPage.cpp [modify] https://crrev.com/8419e454a81a7e8a625c43caae69d674530f8298/third_party/WebKit/Source/platform/heap/ThreadState.cpp [modify] https://crrev.com/8419e454a81a7e8a625c43caae69d674530f8298/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
,
Oct 25 2017
,
Oct 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d8c27e28d9fe88da1c86f4b8b1f284765e43c81 commit 0d8c27e28d9fe88da1c86f4b8b1f284765e43c81 Author: Yutaka Hirano <yhirano@chromium.org> Date: Fri Oct 27 13:24:16 2017 Add a ScriptForbiddenScope optimization for the main thread use-case This is a fix for some performance regressions introcued by https://crrev.com/8419e454a81a7e8a625c43caae69d674530f8298. This CL decreases the access cost for the counter on the main thread. Bug: 777716 , 731019, 756406, 778270 Change-Id: Ida8fd8e722a0cab97d74ca63d9e29f2da755674f Reviewed-on: https://chromium-review.googlesource.com/741202 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#512165} [modify] https://crrev.com/0d8c27e28d9fe88da1c86f4b8b1f284765e43c81/third_party/WebKit/Source/platform/bindings/ScriptForbiddenScope.cpp [modify] https://crrev.com/0d8c27e28d9fe88da1c86f4b8b1f284765e43c81/third_party/WebKit/Source/platform/bindings/ScriptForbiddenScope.h |
||||
►
Sign in to add a comment |
||||
Comment 1 by yhirano@chromium.org
, Oct 24 2017