Change 20080622-maxcarlson-A by [EMAIL PROTECTED] on 2008-06-22 16:14:10 PDT
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix DOM leaks in IE

Bugs Fixed: LPP-6470 - DHTML: loading media at runtime leaks DOM resources in IE

Technical Reviewer: promanik
QA Reviewer: ptw

Details: LzSprite.js - Stop trying to preemtively play resources at init time - it created too many problems. Unload if setSource() is called with 'null' or null. Make sure this.__LZimg is really valid before calling replaceChild(). Clear images of all events as soon as they finish onload/timeout/error. Move image event clearing code from __discardElement() to __clearImageEvents() method. Create a dummy object with the image size in place of the destroyed DOM image element. Clear out lz.BrowserUtils.scope hash when the root/canvas sprite is destroyed. Do more checking in __discardElement() for null/ invalid elements.

LzPool.js - Cleanup/readability.

LzInstantiator.lzs - Avoid creating children that have been destroyed.

LzNode.lzs - Bail out of arg application in __LZapplyArgs() if a node is deleted, e.g. by setDatapath causing replication.

Tests: smoketest, amazon, lzpix, calendar, weather, component sampler in dhtml. Also see the bug report testcase for the four flavors of leakage. None leak at all with this patch - process explorer/drip detector 0.5 show no leaks in IE 6!

Files:
M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M      WEB-INF/lps/lfc/kernel/dhtml/LzPool.js
M      WEB-INF/lps/lfc/services/LzInstantiator.lzs
M      WEB-INF/lps/lfc/core/LzNode.lzs

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/20080622-maxcarlson-A.tar

Reply via email to