Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: sky/framework/sky-element/sky-binder.sky

Issue 829993004: Fix resource clean up in TemplateIterator.close() (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 --> 5 -->
6 <import src="observe.sky" as="observe" /> 6 <import src="observe.sky" as="observe" />
7 7
8 <script> 8 <script>
9 var stagingDocument = new Document(); 9 var stagingDocument = new Document();
10 10
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 close() { 448 close() {
449 if (this.closed) 449 if (this.closed)
450 return; 450 return;
451 this.unobserve(); 451 this.unobserve();
452 for (var i = 0; i < this.instances.length; i++) { 452 for (var i = 0; i < this.instances.length; i++) {
453 this.instances[i].close(); 453 this.instances[i].close();
454 } 454 }
455 455
456 this.instances.length = 0; 456 this.instances.length = 0;
457 457
458 if (this.ifBinding) 458 if (this.ifObserver)
459 this.ifBinding.close(); 459 this.ifObserver.close();
460 if (this.binding) 460 if (this.valueObserver)
461 this.binding.close(); 461 this.valueObserver.close();
462 462
463 iterators.delete(this.template); 463 iterators.delete(this.template);
464 this.closed = true; 464 this.closed = true;
465 } 465 }
466 } 466 }
467 467
468 module.exports = { 468 module.exports = {
469 createInstance: createInstance, 469 createInstance: createInstance,
470 }; 470 };
471 </script> 471 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698