Author: ptw
Date: 2008-01-03 08:38:08 -0800 (Thu, 03 Jan 2008)
New Revision: 7714
Added:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzMemory.lzs
Removed:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/swf/LzMemory.as
Modified:
openlaszlo/branches/wafflecone/
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/Library.lzs
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzDebug.lzs
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzMessage.lzs
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
openlaszlo/branches/wafflecone/lps/includes/laszlo-debugger.css
Log:
Change 20080102-ptw-l by [EMAIL PROTECTED] on 2008-01-02 19:49:48 EST
in /Users/ptw/OpenLaszlo/wafflecone
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
Summary: Merged revisions 7489,7573 via svnmerge from
http://svn.openlaszlo.org/openlaszlo/trunk
Technical Reviewer: amy (Message-ID: <[EMAIL PROTECTED]>)
QA Reviewer: mamye (pending)
Details:
.......
r7489 | ptw | 2007-12-09 08:42:32 -0500 (Sun, 09 Dec 2007) | 53 lines
Change 20071207-ptw-v by [EMAIL PROTECTED] on 2007-12-07 22:50:21 EST
in /Users/ptw/OpenLaszlo/ringding-2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Bring memory tracing to the modern era
Bugs Fixed:
LPP-5205: 'Debug.whyAlive no longer shows reference keeping object alive'
Technical Reviewer: [EMAIL PROTECTED] (message:<[EMAIL PROTECTED]>)
QA Reviewer: [EMAIL PROTECTED] (pending)
Details:
LzMessage: fix error in concat observed in passing, make
appendInternal of another LzMessage concat, not present the
message
LzMemory: Make some things classes. Store leaks as a new class
that has a pretty descriptor and breaks out the leak information
for easy inspection. Use a stable sort on leaks, sort the biggest
leak to the front of the Array. Make whyAlive describe the top
leaks.
LzDebug.*: Use user toString methods, obey unique flag.
LzFormatter: New formatting flag `=` takes the next argument as
the object to be represented by the format (overriding the normal
hot-linking that occurs in the debugger so you can write a custom
representation for an object).
Tests:
Debug.markObjects()
Debug.findNewObjects()
Debug.whyAlive()
now yields useful information:
lzx> Debug.whyAlive()
global.spriteroot.$m1.debugloader.loadmc1.reqobj: (?\194?\16352)
?\194?\171Object#100| {_dbg_check:...?\194?\187
global.LzFocus.csel.sprite.__LZtextclip.filters: (?\194?\1636)
?\194?\171Array(0)#102| []?\194?\187
global.LzModeManager.__LZlastclick.sprite.__LZbuttonRef.but.filters:
(?\194?\1636) ?\194?\171Array(0)#104| []?\194?\187
global.__offscreenkeyclip.filters: (?\194?\1636) ?\194?\171Array(0)#106|
[]?\194?\187
global.spriteroot.$m0.$m0.$m5.$LzText.filters: (?\194?\1636)
?\194?\171Array(0)#108| []?\194?\187
global.spriteroot.$m0.$m0.$mcB.but.filters: (?\194?\1636)
?\194?\171Array(0)#110| []?\194?\187
global.spriteroot.$m1.$m0.$m0.$mcB.but.filters: (?\194?\1636)
?\194?\171Array(0)#112| []?\194?\187
global.spriteroot.$m1.$m0.$m1.$m0.$mcB.but.filters: (?\194?\1636)
?\194?\171Array(0)#114| []?\194?\187
global.spriteroot.$m1.$m0.$m1.$m1.$mcB.but.filters: (?\194?\1636)
?\194?\171Array(0)#116| []?\194?\187
global.spriteroot.$m1.$m0.$m1.$m2.$mcB.but.filters: (?\194?\1636)
?\194?\171Array(0)#118| []?\194?\187
...
?\194?\171__LzLeaks(28)#120| 208 smoots?\194?\187
lzx>
.......
r7573 | ptw | 2007-12-17 17:41:55 -0500 (Mon, 17 Dec 2007) | 64 lines
Change 20071214-ptw-i by [EMAIL PROTECTED] on 2007-12-14 18:23:23 EST
in /Users/ptw/OpenLaszlo/ringding-2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Make the memory tracer generic
New Features: Memory tracing now works (for some definition of works)
in DHTML in addition to SWF.
Bugs Fixed:
LPP-2071: '__LzDebug.whyAlive() incorrectly reports leaking arrays with SWF8'
Technical Reviewer: [EMAIL PROTECTED] (pending)
QA Reviewer: [EMAIL PROTECTED] (message://<[EMAIL PROTECTED]>)
Documentation:
Debug.markObjects, findNewObjects, whyAlive now work in SWF and
DHTML. DHTML is only beta-quality, and you will get a warning
saying so, because it appears that some underlying runtimes
themselves leak DOM objects (or our usage of them causes them to
be leaked). It works reasonably well in Safari, less well in
Firefox, hangs Opera, is untested in IE (but IE has its own leak
tools).
Details:
kernel.js: Initialize the debug window early so memory tracing can
find it. Use a static style for debugger output, so that a new
CSSStyle object is not consed for every line of debugger output.
LzMemory.lzs: Make this generic (although there are still some if
($as2) bits for now, I think a unified code base is better than
splitting this into the kernels). Add some metering to see how
the background tracer is working. Add some documentation. Add
some try/catch blocks to ignore errors trying to trace native
wrapped objects in DHTML. Don't trace native wrapped object slots
that return a 'new' object each time you access them. Use
set/clearInterval instead of the old tracer movieclip to run the
background task. Fix the path evaluator to be correct and
platform-neutral. Use objectOwnProperties to find slots to trace.
Make the code to hide the debugger from the leak detector generic,
hide the debugger DOM tree. Make whyAlive output all relevant
data, so it can be invoked as a button, not just from the
debugger.
Library.lzs: switch from the platform leak detector to the generic
one.
LzRuntime: Use static style for debugger output.
laszlo-debugger.css: Define that static style.
Tests:
The following test program works for me (pressing the 3 buttons at
the appropriate times, creates a leak report):
<canvas debug="true">
<simplelayout axis="x" />
<button onclick="Debug.markObjects()">Mark</button>
<button onclick="Debug.findNewObjects()">Find New</button>
<button onclick="Debug.whyAlive()">Why Alive</button>
</canvas>
.......
Property changes on: openlaszlo/branches/wafflecone
___________________________________________________________________
Name: svnmerge-integrated
-
/openlaszlo/branches/legals:1-5746,5748-5756,5758-5770,5772-5819,5821-5860,5862-5890,5892-6065,6068-6177,6179-6228,6230-6236,6241-6266
/openlaszlo/trunk:1-3892,3894-3952,3954-4393,4395-4461,4463-4467,4469-4471,4473-5085,5087-5171,5173-5203,5205-5209,5211-5331,5333-5334,6484-6485,6487,6490-6492,6494-6495,6497,6500-6502,6504-6505,6507-6520,6531-6532,6534-6538,6540-6547,6549,6551-6558,6560-6567,6569-6581,6583-6586,6588,6590-6607,6610-6611,6613-6622,6624-6629,6632-6636,6638-6639,6641-6642,6646-6648,6653,6656-6663,6665-6669,6671-6683,6685-6686,6688-6706,6708-6715,7237,7518-7521,7523-7527,7529,7531-7538,7540-7545,7547-7549,7551-7560,7563-7570,7572,7574-7575
+
/openlaszlo/branches/legals:1-5746,5748-5756,5758-5770,5772-5819,5821-5860,5862-5890,5892-6065,6068-6177,6179-6228,6230-6236,6241-6266
/openlaszlo/trunk:1-3892,3894-3952,3954-4393,4395-4461,4463-4467,4469-4471,4473-5085,5087-5171,5173-5203,5205-5209,5211-5331,5333-5334,6484-6485,6487,6490-6492,6494-6495,6497,6500-6502,6504-6505,6507-6520,6531-6532,6534-6538,6540-6547,6549,6551-6558,6560-6567,6569-6581,6583-6586,6588,6590-6607,6610-6611,6613-6622,6624-6629,6632-6636,6638-6639,6641-6642,6646-6648,6653,6656-6663,6665-6669,6671-6683,6685-6686,6688-6706,6708-6715,7237,7489-7491,7494,7497-7498,7500-7521,7523-7527,7529,7531-7538,7540-7545,7547-7549,7551-7560,7563-7570,7572-7575
Modified:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
2008-01-03 16:21:35 UTC (rev 7713)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
2008-01-03 16:38:08 UTC (rev 7714)
@@ -3,7 +3,7 @@
/**
* Formatted output
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access public
@@ -167,7 +167,10 @@
* full `Debug.__String` format used by <xref
* linkend="Debug+debug.write"/>. `%w` format obeys <xref
* linkend="Debug+debug.printLength"/>. If a precision is specified,
- * that is used as printLength.
+ * that is used as printLength. There is an additional modifier
+ * (=) which will take the next argument as the object to be
+ * represented (i.e., linked to) by the formatted string; thus
+ * permitting custom representations.
*
* @param string control: A control string where % indicates a
* subsequent argument is to be substituted.
@@ -237,6 +240,8 @@
var length = '';
var precision = null;
var directive = null;
+ // The object that is to be represented
+ var object = null;
// var extra = null;
while ((start < limit) &&
// swf7 (! directive)
@@ -279,6 +284,11 @@
break;
case '.': precision = ''; break;
case 'h': case 'l': break;
+ case '=':
+ // Take the next argument to be the object represented
+ object = getarg(argno);
+ argno++;
+ break;
// case '{':
// // Look for a match
// var close = ctrl.indexOf('}', start);
@@ -295,6 +305,7 @@
}
}
var value = getarg(argno);
+ if (object == null) { object = value; }
// set decimals
var decimals = null;
var force = false;
@@ -355,7 +366,7 @@
switch (directive) {
case 'D': case 'U': case 'I': case 'O': case 'X': case 'F': case 'E':
case 'G':
value = Number(value);
- out.append(this.pad(value, length, decimals, pad, sign, radix,
force).toUpperCase());
+ out.appendInternal(this.pad(value, length, decimals, pad, sign,
radix, force).toUpperCase(), object);
argno++; // consume value
break;
case 'c':
@@ -368,7 +379,7 @@
// We let __String abbreviate, for best legibility
out.appendInternal(this.pad(Debug.__String(value, true, width,
alternate),
length, null, pad, sign, radix, force),
- value);
+ object);
argno++; // consume value
break;
}
@@ -390,12 +401,12 @@
str = '' + value;
}
out.appendInternal(this.pad(str, length, decimals, pad, sign, radix,
force),
- value);
+ object);
argno++; // consume value
break;
case 'd': case 'u': case 'i': case 'o': case 'x': case 'f': case 'e':
case 'g':
value = Number(value);
- out.append(this.pad(value, length, decimals, pad, sign, radix,
force));
+ out.appendInternal(this.pad(value, length, decimals, pad, sign,
radix, force), object);
argno++; // consume value
break;
case '%':
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
2008-01-03 16:21:35 UTC (rev 7713)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
2008-01-03 16:38:08 UTC (rev 7714)
@@ -1,7 +1,7 @@
/* -*- mode: JavaScript; c-basic-offset: 2; -*- */
/**
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access private
@@ -213,7 +213,7 @@
var dwd = dw.document;
var span = dwd.createElement('span');
// IE does not display \n in white-space: pre, so we translate...
- span.innerHTML = '<span style="white-space: pre">' +
msg.split('\n').join('<br />') + '</span>';
+ span.innerHTML = '<span class="OUTPUT">' + msg.split('\n').join('<br
/>') + '</span>';
dwd.body.appendChild(span);
// Scroll to end
span.scrollIntoView(false);
@@ -431,5 +431,34 @@
}
}
}
+
+ if ($as2) {
+ /**
+ * Evaluate a closure in context, ignoring any errors
+ * @param closure:Function the closure to evaluate
+ * @param context:Object the context to evaluate the closure in
+ * @param errval:* the value to return if there is an error
+ * @access private
+ */
+ Debug.ignoringErrors = function ignoringErrors (closure, context, errval) {
+ #pragma "warnUndefinedReferences=false"
+ return closure.call(context);
+ }
+ } else {
+ /**
+ * Evaluate a closure in context, ignoring any errors
+ * @param closure:Function the closure to evaluate
+ * @param context:Object the context to evaluate the closure in
+ * @param errval:* the value to return if there is an error
+ * @access private
+ */
+ Debug.ignoringErrors = function ignoringErrors (closure, context, errval) {
+ #pragma "warnUndefinedReferences=false"
+ try {
+ return closure.call(context);
+ } catch(e) {
+ return errval;
+ }
+ }
+ }
}
-
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/Library.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/Library.lzs
2008-01-03 16:21:35 UTC (rev 7713)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/Library.lzs
2008-01-03 16:38:08 UTC (rev 7714)
@@ -9,7 +9,7 @@
* In some runtimes the Debug object is subclassed for added
* functionality by the component/debug library
*
- * @copyright Copyright 2001-2006 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2006, 2008 Laszlo Systems, Inc. All Rights
Reserved.
* Use is subject to license terms.
*
* @access private
@@ -53,10 +53,11 @@
#include "debugger/LzBacktrace.lzs"
#include "debugger/LzTrace.lzs"
#include "debugger/LzMonitor.lzs"
+ // Add memory tracing
+ #include "debugger/LzMemory.lzs"
if ($as2) {
// Order beyond here has not been thought about (yet)
#include "debugger/platform/swf/LzRemote.as"
- #include "debugger/platform/swf/LzMemory.as"
#include "debugger/platform/swf/LzFlashRemote.as"
}
// N.B.: LzInit.as is loaded as the last thing in LaszloLibrary
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzDebug.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzDebug.lzs
2008-01-03 16:21:35 UTC (rev 7713)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzDebug.lzs
2008-01-03 16:38:08 UTC (rev 7714)
@@ -2,7 +2,7 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access public
@@ -49,7 +49,7 @@
/**
* Possible values of Debug.messageLevel (q.v.)
*/
-Debug.messageLevels = {ALL: 0, DEBUG: 1, INFO: 2, WARNING: 3, ERROR: 4, NONE:
5};
+Debug.messageLevels = {ALL: 0, MONITOR: 1, TRACE: 2, DEBUG: 3, INFO: 4,
WARNING: 5, ERROR: 6, NONE: 7};
/**
* Debug messages are enabled/disabled by the
@@ -461,6 +461,58 @@
}
}
Debug.format("\n---END OF BUG REPORT---\n");
-}
+};
+/**
+ * Fills two arrays with the object's own properties. If the object
+ * has a non-negative integer 'length' property (i.e., might be
+ * intended as an Array), numeric names that fall between 0 and the
+ * value of length are added to the `indices` array, otherwise they
+ * are added to the `names` array. If either array is null, those
+ * properties will be omitted altogether. @param obj:Object the
+ * object to examine @param names:Array the array to append names to
+ * @param indices:Array the array to append indices to @param
+ * limit:Number don't accumulate more than this many properties (used
+ * to limit computation on large objects), default Infinity
+ */
+Debug.objectOwnProperties = function (obj, names, indices, limit) {
+ if (!limit) { limit = Infinity; };
+ // Check for 'array-ness'
+ var alen = (('length' in obj) &&
+ (Math.floor(obj.length) === obj.length) &&
+ (obj.length >= 0)) ? obj.length : false;
+ var hopp = 'hasOwnProperty' in obj && obj.hasOwnProperty instanceof Function;
+ // Use typeof == 'object' rather than instanceof Object for native prototypes
+ var proto = (('__proto__' in obj && (typeof obj.__proto__ == 'object')) ?
obj.__proto__ :
+ (('constructor' in obj && (typeof obj.constructor.prototype ==
'object')) ? obj.constructor.prototype : false));
+ for (var key in obj) {
+ // Heuristic to find 'interesting' slots, by which we mean slots
+ // that have a non-inherited value. This should find 'own' slots,
+ // getters, and funny 'native' slots like swf movieclips, etc.
+ if ((! proto) ||
+ // Be careful calling hasOwnProperty (it could be a method in
+ // a native prototype that will fail when called on the
+ // prototype itself)
+ this.ignoringErrors(function () { return obj.hasOwnProperty(key);},
this, (! (key in proto))) ||
+ // Be careful poking at prototypes (consider getters that may
+ // fail when called on the prototype)
+ (obj[key] !== this.ignoringErrors(function () { return proto[key];},
this, {}))) {
+ if ((alen != false) &&
+ // Only `==` here because all keys are strings
+ (Math.floor(key) == key) &&
+ (0 <= key) && (key < alen)) {
+ if (indices) {
+ // Ensure indices are numbers, not strings
+ indices.push(Number(key));
+ if (--limit == 0) { return; }
+ }
+ } else {
+ if (names) {
+ names.push(key);
+ if (--limit == 0) { return; }
+ }
+ }
+ }
+ }
+};
Copied: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzMemory.lzs
(from rev 7708, openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMemory.lzs)
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzMessage.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzMessage.lzs
2008-01-03 16:21:35 UTC (rev 7713)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzMessage.lzs
2008-01-03 16:38:08 UTC (rev 7714)
@@ -2,7 +2,7 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access public
@@ -102,7 +102,7 @@
*/
LzMessage.prototype.concat = function () {
var msg = new LzMessage(this.message.concat.apply(this, arguments));
- var offset = 0;
+ var offset = this.message.length;
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (arg instanceof LzMessage) {
@@ -152,13 +152,22 @@
* @param Object obj: the object represented, or null
*/
LzMessage.prototype.appendInternal = function (str, obj) {
- if (arguments.length < 2) {
+ if (arguments.length < 2) {
var id = null;
} else {
var id = Debug.IDForObject(obj);
}
if (id == null) {
this.message += str;
+ } else if (obj instanceof LzMessage) {
+ // If it is already a message, just concatenate it
+ var offset = this.message.length;
+ this.message += obj.message;
+ var ao = obj.objects;
+ for (var j = 0; j < ao.length; j++) {
+ var od = ao[j];
+ this.objects.push({id: od.id, start: od.start+offset, end:
od.end+offset});
+ }
} else {
var start = this.message.length;
this.message += str;
Modified:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
===================================================================
---
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
2008-01-03 16:21:35 UTC (rev 7713)
+++
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
2008-01-03 16:38:08 UTC (rev 7714)
@@ -321,7 +321,7 @@
// No pretty for these, you don't know if the user toString is
// uniquifying
pretty = (! unique);
- s = String(thing);
+ s = thing.toString();
}
// Print unidentified objects as abbreviated list of props
else {
@@ -366,7 +366,9 @@
s = String(thing);
}
- if (pretty && (s != "") && (s.length < limit)) {
+ if (pretty &&
+ ((t != 'object') || (! unique)) &&
+ (s != "") && (s.length < limit)) {
return s;
}
}
@@ -593,6 +595,6 @@
};
//* A_LZ_COPYRIGHT_BEGIN ******************************************************
-//* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+//* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
//* Use is subject to license terms. *
//* A_LZ_COPYRIGHT_END ********************************************************
Modified:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
===================================================================
---
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
2008-01-03 16:21:35 UTC (rev 7713)
+++
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
2008-01-03 16:38:08 UTC (rev 7714)
@@ -3,7 +3,7 @@
/**
* Runtime support for Debug
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access public
@@ -11,12 +11,21 @@
* @subtopic Debugging
*/
+/** The HTML debug window
+ * @access private
+ */
+Debug.DebugWindow = null;
+
/**
* @access private
* Instantiates an instance of the user Debugger window
* Called last thing by the compiler when the app is completely loaded.
*/
Debug.makeDebugWindow = function () {
+ // The application and debugger are sibling iframes in the
+ // embedding.
+ this.DebugWindow = window.parent.frames['LaszloDebugger'];
+
// Name all global singletons
var module = $modules.lz;
var idp = new RegExp('^[_$\\w\\d]+$');
@@ -50,43 +59,27 @@
}
}
}
- // Nothing else to do for DHTML, since the Debugger window is done
- // in HTML and is always available (see below).
}
-/** The HTML debug window
- * @access private
- */
-Debug.DebugWindow = null;
-
/**
* @access private
*/
Debug.clear = function () {
var dw = this.DebugWindow;
- if (! dw) {
- // The application and debugger are sibling iframes in the
- // embedding.
- dw = this.DebugWindow = window.parent.frames['LaszloDebugger'];
- }
dw.document.body.innerHTML = '';
-}
+};
+
/**
* @access private
*/
Debug.addHTMLText = function (str) {
var dw = this.DebugWindow;
- if (! dw) {
- // The application and debugger are sibling iframes in the
- // embedding.
- dw = this.DebugWindow = window.parent.frames['LaszloDebugger'];
- }
var dwd = dw.document;
var span = dwd.createElement('span');
var dwdb = dwd.body;
// IE does not display \n in white-space: pre, so we translate...
- span.innerHTML = '<span style="white-space: pre">' +
str.split('\n').join('<br />') + '</span>';
+ span.innerHTML = '<span class="OUTPUT">' + str.split('\n').join('<br />') +
'</span>';
dwdb.appendChild(span);
// Duplicated from __write, for direct calls to this
this.atFreshLine = (str.charAt(str.length-1) == '\n');
Modified:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
===================================================================
---
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
2008-01-03 16:21:35 UTC (rev 7713)
+++
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
2008-01-03 16:38:08 UTC (rev 7714)
@@ -380,7 +380,7 @@
// No pretty for these, you don't know if the user toString is
// uniquifying
pretty = (! unique);
- s = String(thing);
+ s = thing.toString();
}
// Print unidentified objects as abbreviated list of props
else {
@@ -425,7 +425,9 @@
s = String(thing);
}
- if (pretty && (s != "") && (s.length < limit)) {
+ if (pretty &&
+ ((t != 'object') || (! unique))
+ && (s != "") && (s.length < limit)) {
return s;
}
// Compute id; force if you couldn't print pretty due to
@@ -642,7 +644,7 @@
}
//* A_LZ_COPYRIGHT_BEGIN ******************************************************
-//* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+//* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
//* Use is subject to license terms. *
//* A_LZ_COPYRIGHT_END ********************************************************
Deleted:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/swf/LzMemory.as
Modified: openlaszlo/branches/wafflecone/lps/includes/laszlo-debugger.css
===================================================================
--- openlaszlo/branches/wafflecone/lps/includes/laszlo-debugger.css
2008-01-03 16:21:35 UTC (rev 7713)
+++ openlaszlo/branches/wafflecone/lps/includes/laszlo-debugger.css
2008-01-03 16:38:08 UTC (rev 7714)
@@ -44,7 +44,12 @@
background-color: white;
}
+/* Debug.addText */
+span.OUTPUT
+{
+ white-space: pre;
+}
/*
- * Copyright 2006 Laszlo Systems, Inc. All Rights Reserved.
+ * Copyright 2006, 2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*/
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins