Skip to content

Commit a7e74dd

Browse files
author
p01
committed
Clean the context upon getting a top level frame.
1 parent 420a8bf commit a7e74dd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/resource-manager/resource_service.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ cls.ResourceManagerService = function(view)
2424
var data = new cls.DocumentManager["1.0"].AboutToLoadDocument(msg);
2525

2626
if (!data.parentFrameID)
27+
{
28+
if(this._context)
29+
delete this._context;
2730
this._context = new cls.ResourceContext(data);
31+
}
2832

2933
if (this._context)
3034
this._context.update("abouttoloaddocument", data);
@@ -83,7 +87,8 @@ cls.ResourceManagerService = function(view)
8387

8488
this._on_debug_context_selected_bound = function()
8589
{
86-
this._context = null;
90+
if (this._context)
91+
delete this._context;
8792
this._view.update();
8893
}.bind(this);
8994

0 commit comments

Comments
 (0)