Skip to content

Commit 8c84cb7

Browse files
committed
Fix for DFL-3375. The expanded state of the object inspection cache is not desirable in the called function in Return Values section. Use a boolean to indicate if caching is desired or not.
1 parent 8d63820 commit 8c84cb7

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/ecma-debugger/objectinspection.6.0/inspectablejsobject.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ cls.EcmascriptDebugger["6.0"] || (cls.EcmascriptDebugger["6.0"] = {});
1515
*/
1616

1717
cls.EcmascriptDebugger["6.0"].InspectableJSObject =
18-
function(rt_id, obj_id, identifier, _class, pseudo_properties, scope_list)
18+
function(rt_id, obj_id, identifier, _class, pseudo_properties, scope_list, use_cache)
1919
{
20-
this._init(rt_id, obj_id, pseudo_properties || null, identifier, _class, scope_list);
20+
this._init(rt_id, obj_id, pseudo_properties || null, identifier, _class, scope_list, use_cache);
2121
}
2222

2323
cls.EcmascriptDebugger["6.0"].InspectableJSObject.prototype = new function()
@@ -86,7 +86,7 @@ cls.EcmascriptDebugger["6.0"].InspectableJSObject.prototype = new function()
8686
"}"
8787
*/
8888

89-
this._init = function(rt_id, obj_id, virtual_props, identifier, _class, scope_list)
89+
this._init = function(rt_id, obj_id, virtual_props, identifier, _class, scope_list, use_cache)
9090
{
9191
this.id = this._get_id();
9292
this._obj_map =
@@ -120,7 +120,7 @@ cls.EcmascriptDebugger["6.0"].InspectableJSObject.prototype = new function()
120120
{
121121
window.inspections = new cls.Inspections();
122122
}
123-
window.inspections.add(this);
123+
window.inspections.add(this, use_cache);
124124
}
125125

126126
this._get_subtree = function(path)
@@ -939,9 +939,11 @@ cls.Inspections = function()
939939

940940
cls.InspectionsPrototype = function()
941941
{
942-
this.add = function(obj)
942+
this.add = function(obj, use_cache)
943943
{
944-
this._objects[obj.object_id] = obj;
944+
if (use_cache)
945+
this._objects[obj.object_id] = obj;
946+
945947
var id = obj.id || obj.name;
946948
if (id)
947949
this[id] = obj;

src/ecma-debugger/templates.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,10 @@
455455
new cls.InspectableJSObject(rt_id,
456456
object.objectID,
457457
function_name,
458-
object.className);
458+
object.className,
459+
null,
460+
null,
461+
true);
459462
var func_search_term = value_template.length ? null : search_term;
460463
var func = window.templates.inspected_js_object(func_model, true, null, func_search_term);
461464

0 commit comments

Comments
 (0)