Chromium Code Reviews
DescriptionRename JavaObjectWeakGlobalRef::is_empty to avoid misuse.
JavaObjectWeakGlobalRef::is_empty was being misused to attempt to check
if the object referred to has been collected or not (see
crbug.com/661444 for one case; others in this CL). The method is
valuable in some cases that actually just want to check if the weak
reference has been initialised, so rename it to is_uninitialized and add
an explanatory comment to make it more obvious what to do with it.
Fix a couple of existing uses that are incorrect or dubious, and rename
the "okay" uses to call the new function.
BUG=
Committed: https://crrev.com/aef040326a50569a1838d2df24b636a90f8179f1
Cr-Commit-Position: refs/heads/master@{#430417}
Patch Set 1 #
Total comments: 4
Messages
Total messages: 20 (4 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||