Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

document leak for iframe directive #6093

Closed
IL55 opened this issue Feb 3, 2014 · 3 comments
Closed

document leak for iframe directive #6093

IL55 opened this issue Feb 3, 2014 · 3 comments
Assignees

Comments

@IL55
Copy link

IL55 commented Feb 3, 2014

Hi,
I found strange thing, when I use iframe-based angular directive like this

   <iframe ng-src="{{url}}"></iframe>

I found that number of documents increased, I controlled this parameter via chrome -> developer tools -> timeline. I fired manually gc a number of times but documents count stay unchanged.
I use latest version of chrome i.e. Version 32.0.1700.102 m and angular, i.e. Angular 1.2.10.

This example not mine, but I see the same behavior, if you press to the button you can see that number of DOM documents increased (and never decreased).
http://embed.plnkr.co/RDOJvgBdu4OKQBk1MfHL/preview

iframe_document_leak

Does it mean that I forget something like this:

     scope.$on('$destroy', function(){
                $element.find('#myframe').off();
                $element.find('#myframe').remove();
                $element.off();
            });

Or it is chrome/angular bug ?

Thanks,
Igor

@IgorMinar IgorMinar self-assigned this Feb 4, 2014
@iki
Copy link

iki commented Feb 4, 2014

confirmed on the plunker link with chrome-dev 34.0.1809.0

@IgorMinar
Copy link
Contributor

I took a quick peek and it looks like a chrome/v8 bug similar to the one we were chasing down at #4864

@IgorMinar
Copy link
Contributor

@IL55 you shouldn't need to do anything. it's web inspector + v8 bug.

related: #4864 and https://code.google.com/p/chromium/issues/detail?id=304689

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants