[Laszlo-checkins] r12123 - openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml
bargull@openlaszlo.org
bargull at openlaszlo.org
Mon Dec 15 13:16:00 PST 2008
Author: bargull
Date: 2008-12-15 13:15:57 -0800 (Mon, 15 Dec 2008)
New Revision: 12123
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
Log:
Change 20081215-bargull-Fgw by bargull at dell--p4--2-53 on 2008-12-15 21:22:57
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: handle Function.arguments in objectOwnProperties()
New Features:
Bugs Fixed: LPP-5446
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Function.arguments is not a proper Array in JS1, all its indices are unenumerable, so for-in loop won't display anything.
Tests:
see bugreport
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js 2008-12-15 20:19:35 UTC (rev 12122)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js 2008-12-15 21:15:57 UTC (rev 12123)
@@ -268,19 +268,31 @@
override function objectOwnProperties (obj:*, names:Array=null, indices:Array=null, limit:Number=Infinity, nonEnumerable:Boolean=false) {
var hasProto = obj && obj['hasOwnProperty'];
- if (names && nonEnumerable) {
+ if (names && nonEnumerable && hasProto) {
// Unenumerable properties of ECMA objects
// TODO: [2006-04-11 ptw] enumerate Global/Number/Math/Regexp
// object properties
for (var p in {callee: true, length: true, constructor: true, prototype: true}) {
try {
- if (hasProto && obj.hasOwnProperty(p)) {
+ if (obj.hasOwnProperty(p)) {
names.push(p);
}
} catch (e) {};
}
}
+ if (hasProto && indices) {
+ // Function.arguments is not a proper Array in JS1
+ try {
+ if (obj.hasOwnProperty('callee')) {
+ for (var i = 0, len = obj.length; i < len; ++i) {
+ indices.push(i);
+ if (--limit == 0) { return; }
+ }
+ }
+ } catch (e) {};
+ }
+
super.objectOwnProperties(obj, names, indices, limit, nonEnumerable);
}
More information about the Laszlo-checkins
mailing list