Commit 881f3981 authored by Egor Pasko's avatar Egor Pasko Committed by Chromium LUCI CQ

android: LibraryLoader: remove stale mention of doInBackground()

From a comment remove a confusing mention of an old method
doInBackground(), removed since. This reference points at the comment
that was introduced at e0825567 (from 2012) and was saying:
"""
  // We're loading the .so in a background thread. Potentially, this
  // can break native code that relies on static initializers using
  // thread local storage, as the library would normally load in the
  // main thread. If do we hit such cases we should remove those static
  // initializers, as we chrome has banned them.
  // (Worst case, we can go back to just warming up the file in the system
  // cache here and do the actual loading in onPostExecute().)
"""

Since then in many other places we are relying on *not* having static
initializers touching TLS. We have very few static initializers in 2020,
if any, and guard against adding them. This note is no longer important.

Bug: 1154224
Change-Id: I8e9059d73e71b6e5f779037d0d8cfa6f08a745a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2574739
Auto-Submit: Egor Pasko <pasko@chromium.org>
Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Commit-Queue: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835320}
parent e15095da
......@@ -327,11 +327,9 @@ public class LibraryLoader {
}
/**
* Loads the library and blocks until the load completes. The caller is responsible
* for subsequently calling ensureInitialized().
* May be called on any thread, but should only be called once. Note the thread
* this is called on will be the thread that runs the native code's static initializers.
* See the comment in doInBackground() for more considerations on this.
* Loads the library and blocks until the load completes. The caller is responsible for
* subsequently calling ensureInitialized(). May be called on any thread, but should only be
* called once.
*/
public void loadNow() {
loadNowOverrideApplicationContext(ContextUtils.getApplicationContext());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment