summaryrefslogtreecommitdiff
path: root/apex
diff options
context:
space:
mode:
author Nan Wu <wnan@google.com> 2024-12-12 19:14:34 +0000
committer Nan Wu <wnan@google.com> 2024-12-16 20:55:35 +0000
commitc28d1c7415c8836a196b0e8037958771fab57c4d (patch)
treeec42a4ac99cd25cd52a43af0f33f1dbc30fd6a7f /apex
parentf22a6ea2c72dde2fa07c612f8d1bc242da2e8ed7 (diff)
Fix LazyValue ClassLoader issue
LazyValue's class loader is set when the bundle that contains it is first unparceled. This is when the LazyValue object is created. But between when the container bundle is unparceled and when the LazyValue is unparceled (LazyValue.apply() is called), the bundle's ClassLoader could have changed. LazyValue unparcel should use the new ClassLoader. To fix this issue, replace the ClassLoader member of the LazyValue with a ClassLoaderProvider, which could simply point back to the containe bundle as the ClassLoaderProvider. Thus, updates of the ClassLoader of the container bundle is always effective when the LazyValue.apply is called. Also, when a bundle is retrieved from a bundle, the parent's classLoader needs to be set to the child. This is because if a bundle contains another nested bundle, when the top level bundle is unparceled, the nested bundle's classLoader is set as the same as the top level bundle's Bug: 382633789 Test: manual test Flag: EXEMPT bug fix Change-Id: Id775366506d101b618b214837df1a61f1db380d7
Diffstat (limited to 'apex')
0 files changed, 0 insertions, 0 deletions