Skip to content

Commit b851f74

Browse files
authored
Fix error with getObject on a ClassRef (#1326)
* Fix error with getObject on a ClassRef * add all properties * fix test
1 parent 32bc6b7 commit b851f74

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dwds/lib/src/debugging/classes.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ class ClassHelper extends Domain {
100100
var methods = Object.getOwnPropertyNames(proto);
101101
for (var i = 0; i < methods.length; i++) {
102102
if (methodNames.indexOf(methods[i]) == -1
103-
&& typeof proto[methods[i]] == 'function'
104103
&& methods[i] != 'constructor') {
105104
methodNames.push(methods[i]);
106105
}

dwds/test/chrome_proxy_service_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,14 +407,17 @@ void main() {
407407
test('Classes', () async {
408408
var testClass = await service.getObject(
409409
isolate.id, rootLibrary.classes.first.id) as Class;
410-
411410
expect(
412411
testClass.functions,
413412
unorderedEquals([
413+
predicate((FuncRef f) => f.name == 'message' && !f.isStatic),
414+
predicate((FuncRef f) => f.name == 'notFinal' && !f.isStatic),
414415
predicate((FuncRef f) => f.name == 'hello' && !f.isStatic),
415416
predicate((FuncRef f) => f.name == '_equals' && !f.isStatic),
417+
predicate((FuncRef f) => f.name == 'hashCode' && !f.isStatic),
416418
predicate((FuncRef f) => f.name == 'toString' && !f.isStatic),
417419
predicate((FuncRef f) => f.name == 'noSuchMethod' && !f.isStatic),
420+
predicate((FuncRef f) => f.name == 'runtimeType' && !f.isStatic),
418421
]));
419422
expect(
420423
testClass.fields,

0 commit comments

Comments
 (0)