Skip to content

Commit 7d35128

Browse files
committed
GH-314 create new iterator for every 'fields' access
1 parent f4b9c58 commit 7d35128

File tree

1 file changed

+3
-1
lines changed
  • visualvm/libs.profiler/profiler.oql/src/org/graalvm/visualvm/lib/profiler/oql/engine/api/impl

1 file changed

+3
-1
lines changed

visualvm/libs.profiler/profiler.oql/src/org/graalvm/visualvm/lib/profiler/oql/engine/api/impl/hat.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,9 @@ function JavaClassWrapper(jclass) {
441441
this.loader = wrapJavaObject(jclass.classLoader);
442442
this.signers = undefined; //TODO wrapJavaValue(jclass.getSigners());
443443
this.protectionDomain = undefined; //TODO wrapJavaValue(jclass.getProtectionDomain());
444-
this.fields = wrapIterator(jclass.fields.iterator(), true);
444+
Object.defineProperty(this, "fields", {
445+
get:function() { return wrapIterator(jclass.fields.iterator(), true); }
446+
});
445447
this.instanceSize = jclass.instanceSize;
446448
this.name = jclass.name;
447449
this.id = jclass.javaClassId;

0 commit comments

Comments
 (0)