Removed unnecessary potential locking
Function isInitialized, unlike calls ensureinitialized should not block the thread, but it will if initialization is in progress at this moment. It is not necessery to synchronize the sInitialized flag in isInitialized function. It is enough that flag have a primitive type and has a volatile qualifier. R=nyquist@chromium.org, rmcilroy@chromium.org TEST=It is rather hard to test. We've found ~300ms stuck on UI thread, on calling LibraryLoader.isInitialized from ContentApplication.onCreate with profiler Review URL: https://codereview.chromium.org/925513002 Cr-Commit-Position: refs/heads/master@{#318208}
Showing
Please register or sign in to comment