Skip to content

Commit 3ac6888

Browse files
author
p01
committed
Delete the frame and all its resrouces if the top resource of a frame is invalid.
1 parent f5c55cc commit 3ac6888

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/resource-manager/resource_service.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,17 @@ cls.ResourceContext = function(data)
431431

432432
if (res.invalid)
433433
{
434+
// delete the frame and all its resources if the top resource of a frame is invalid
435+
if (frame && frame.resource.id==res.id)
436+
{
437+
delete this.frames[frame.id];
438+
for(var rid in this.resourcesDict)
439+
{
440+
var r = this.resourcesDict[ rid ];
441+
if(r.frameID == frame.id)
442+
delete this.resourcesDict[ rid ];
443+
}
444+
}
434445
delete this.resourcesDict[ res.id ];
435446
}
436447
else

0 commit comments

Comments
 (0)