This repository was archived by the owner on Sep 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-62
lines changed
packages/devtools-reps/src/object-inspector Expand file tree Collapse file tree 3 files changed +10
-62
lines changed Original file line number Diff line number Diff line change @@ -46,45 +46,19 @@ describe("makeNodesForProperties", () => {
4646 ownProperties : {
4747 foo : { value : "foo" } ,
4848 bar : {
49- "configurable" : true ,
50- "enumerable" : true ,
5149 "get" : {
5250 "type" : "object" ,
53- "actor" : "server2.conn1.child1/obj106" ,
54- "class" : "Function" ,
55- "extensible" : true ,
56- "frozen" : false ,
57- "sealed" : false ,
58- "name" : "get x" ,
59- "displayName" : "get x" ,
60- "location" : {
61- "url" : "debugger eval code" ,
62- "line" : 1
63- }
6451 } ,
6552 "set" : {
6653 "type" : "undefined"
6754 }
6855 } ,
6956 baz : {
70- "configurable" : true ,
71- "enumerable" : true ,
7257 "get" : {
7358 "type" : "undefined"
7459 } ,
7560 "set" : {
7661 "type" : "object" ,
77- "actor" : "server2.conn1.child1/obj116" ,
78- "class" : "Function" ,
79- "extensible" : true ,
80- "frozen" : false ,
81- "sealed" : false ,
82- "name" : "set x" ,
83- "displayName" : "set x" ,
84- "location" : {
85- "url" : "debugger eval code" ,
86- "line" : 1
87- }
8862 }
8963 }
9064 } ,
Original file line number Diff line number Diff line change @@ -14,29 +14,16 @@ describe("promises utils function", () => {
1414 enumerable : true ,
1515 configurable : false ,
1616 value : {
17- frozen : false ,
18- ownPropertyLength : 0 ,
19- preview : {
20- kind : "Object" ,
21- ownProperties : { } ,
22- ownPropertiesLength : 0 ,
23- safeGetterValues : { }
24- } ,
2517 actor : "server2.conn2.child1/pausedobj36" ,
2618 promiseState : {
2719 state : "rejected" ,
2820 reason : {
2921 type : "undefined"
3022 } ,
31- creationTimestamp : 1486584316133.3994 ,
32- timeToSettle : 0.001713000237941742
3323 } ,
3424 class : "Promise" ,
3525 type : "object" ,
36- extensible : true ,
37- sealed : false
3826 } ,
39- writable : true
4027 }
4128 } ;
4229
@@ -47,32 +34,17 @@ describe("promises utils function", () => {
4734 const promise = {
4835 path : "root" ,
4936 contents : {
50- enumerable : true ,
51- configurable : false ,
5237 value : {
53- frozen : false ,
54- ownPropertyLength : 0 ,
55- preview : {
56- kind : "Object" ,
57- ownProperties : { } ,
58- ownPropertiesLength : 0 ,
59- safeGetterValues : { }
60- } ,
6138 actor : "server2.conn2.child1/pausedobj36" ,
6239 promiseState : {
6340 state : "rejected" ,
6441 reason : {
6542 type : "3"
6643 } ,
67- creationTimestamp : 1486584316133.3994 ,
68- timeToSettle : 0.001713000237941742
6944 } ,
7045 class : "Promise" ,
7146 type : "object" ,
72- extensible : true ,
73- sealed : false
7447 } ,
75- writable : true
7648 }
7749 } ;
7850
Original file line number Diff line number Diff line change @@ -13,17 +13,19 @@ if (typeof window === "object") {
1313}
1414
1515function getValue ( item ) {
16- let value ;
17-
1816 if ( has ( item , "contents.value" ) ) {
19- value = get ( item , "contents.value" ) ;
20- } else if ( has ( item , "contents.getterValue" ) ) {
21- value = get ( item , "contents.getterValue" , undefined ) ;
22- } else if ( nodeHasAccessors ( item ) ) {
23- value = item . contents ;
17+ return get ( item , "contents.value" ) ;
18+ }
19+
20+ if ( has ( item , "contents.getterValue" ) ) {
21+ return get ( item , "contents.getterValue" , undefined ) ;
22+ }
23+
24+ if ( nodeHasAccessors ( item ) ) {
25+ return item . contents ;
2426 }
2527
26- return value ;
28+ return undefined ;
2729}
2830
2931function isBucket ( item ) {
You can’t perform that action at this time.
0 commit comments