Author: reebalazs
Date: Mon May 7 13:45:06 2007
New Revision: 42792
Modified:
kukit/kukit.js/branch/ree-stripout-comments/kukit/dom.js
Log:
Fix a serious packer bug with full packing.
Any variable names starting with _ are transferred their names with
a symbol table. This is usually good, except when not: for example
we want to read a variable from dom, whose name starts with _.
More surprisingly, the variable names are mangled out of
strings too - a bug in the current packer or we need to update it.
Modified: kukit/kukit.js/branch/ree-stripout-comments/kukit/dom.js
==============================================================================
--- kukit/kukit.js/branch/ree-stripout-comments/kukit/dom.js (original)
+++ kukit/kukit.js/branch/ree-stripout-comments/kukit/dom.js Mon May 7
13:45:06 2007
@@ -377,8 +377,10 @@
// quit if the init function has already been called
// XXX I believe we want to call the function too, then
- if (doc._embeddedContentLoadedInitDone) {
- ;;; kukit.logWarning('Iframe already initialized, but we execute the
action enyway, as requested.');
+ // XXX attribute access starting with _ breaks full compression, even in
strings
+ //if (doc._embeddedContentLoadedInitDone) {
+ if (doc['_' + 'embeddedContentLoadedInitDone']) {
+ ;;; kukit.logWarning('Iframe already initialized, but we execute the
action anyway, as requested.');
this.counter.restart = false;
}
@@ -388,7 +390,9 @@
// on the document, when loaded. It is safe to check for this in any
// case, however if this option is selected, we rely only on this,
// and skip the otherwise problematic default checking.
- if (typeof doc._kssReadyForLoadEvent != 'undefined') {
+ // XXX attribute access starting with _ breaks full compression, even in
strings
+ //if (typeof doc._kssReadyForLoadEvent != 'undefined') {
+ if (typeof doc['_' + 'kssReadyForLoadEvent'] != 'undefined') {
this.counter.restart = false;
}
@@ -416,7 +420,9 @@
if ( ! this.counter.restart) {
;;; kukit.logDebug('Yes, iframe is loaded.');
- doc._embeddedContentLoadedInitDone = true;
+ // XXX attribute access starting with _ breaks full compression, even
in strings
+ // doc._embeddedContentLoadedInitDone = true;
+ doc['_' + 'embeddedContentLoadedInitDone'] = true;
this.func();
}
};
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins