Blink Loader: make FetchContext::NullInstance thread-safe
Accessing FetchContext passed to ResourceLoadScheduler causes indeterminate crashes. This implies that there might be a race to access NullInstance because dedicated FetchContext instance should be passed in usual production code path, and NullInstance use is only the exception. XHR will touch this regardless of threads, and can cause a race condition among the first and the second access over multiple-threading. This patch creates new FetchContext instance always instead of sharing one instance among all threads. If this affects performance we would consider to make it thread-local. Bug: 803849 Change-Id: I8bcdab577aceccaaea15288c6e3ae4c83f218213 Reviewed-on: https://chromium-review.googlesource.com/880421 Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org> Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#532396}
Showing
Please register or sign in to comment