diff options
author | Steve Block <steveblock@google.com> | 2011-05-12 12:48:14 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-02 14:08:37 +0100 |
commit | b4d178df818e8b6e7a1cfbb0e34bbf7bb9d74ec9 (patch) | |
tree | 85bdbdf9e1873a443a8215103fb09d35bd420b33 /Source/WebCore/storage/DatabaseSync.cpp | |
parent | 1b22c7a9c33756726c60ab2c9c67d4bbeac153ce (diff) | |
download | external_webkit-b4d178df818e8b6e7a1cfbb0e34bbf7bb9d74ec9.zip external_webkit-b4d178df818e8b6e7a1cfbb0e34bbf7bb9d74ec9.tar.gz external_webkit-b4d178df818e8b6e7a1cfbb0e34bbf7bb9d74ec9.tar.bz2 |
Always check weak global references before using them
We hold weak references to Java objects from native code in several
places to avoid circular reference problems. These objects may become
weakly reachable at any time, after which the GC could null our weak
reference, so we have to null-check at every use.
Note that weak references are nulled before the referent is finalized,
so we can't rely on doing work in the finalizer to wait for the
currently executing message to complete and to remove other messages
from the queue.
This effectively reverts
https://android-git.corp.google.com/g/#change,30955
Bug: 4336862
Change-Id: I431fcac11220cb406c26e31aacb9bda7ea22776e
Diffstat (limited to 'Source/WebCore/storage/DatabaseSync.cpp')
0 files changed, 0 insertions, 0 deletions