mirror of
https://github.com/corda/corda.git
synced 2025-01-19 11:16:54 +00:00
Merge pull request #300 from dicej/order-of-operations
fix order of operations regression in referenceTargetUnreachable
This commit is contained in:
commit
1a0ccb1df8
@ -409,11 +409,11 @@ void referenceTargetUnreachable(Thread* t, Heap::Visitor* v, GcJreference** p)
|
|||||||
(*p)->target() = 0;
|
(*p)->target() = 0;
|
||||||
|
|
||||||
if (objectClass(t, *p) == type(t, GcCleaner::Type)) {
|
if (objectClass(t, *p) == type(t, GcCleaner::Type)) {
|
||||||
*p = cast<GcJreference>(t, (*p)->vmNext());
|
|
||||||
|
|
||||||
// In openjdk, sun/misc/Cleaner extends PhantomReference
|
// In openjdk, sun/misc/Cleaner extends PhantomReference
|
||||||
GcCleaner* cleaner = (*p)->as<GcCleaner>(t);
|
GcCleaner* cleaner = (*p)->as<GcCleaner>(t);
|
||||||
|
|
||||||
|
*p = cast<GcJreference>(t, (*p)->vmNext());
|
||||||
|
|
||||||
cleaner->setQueueNext(t, roots(t)->objectsToClean());
|
cleaner->setQueueNext(t, roots(t)->objectsToClean());
|
||||||
roots(t)->setObjectsToClean(t, cleaner);
|
roots(t)->setObjectsToClean(t, cleaner);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user