printInfo/KJS_VERBOSE improvements

David Faure faure at kde.org
Fri Jan 13 13:50:25 CET 2006


The changes below were lost during the JSC->KJS "merge", I re-did them with the new APIs.

"
Fix testregression timeout during mozilla/js/js1_5/Array/array-001.js with KJS_VERBOSE;
printing out the contents of an array with 4294967290 elements can indeed take a pretty long time.

BTW this shows how to make Mozilla eat all your RAM: var arr = Array(4294967290); alert(arr);
At least khtml shows the alarmhandler dialog regularly to abort the script :)
"
[well, not anymore since the alarmhandler got disabled]

Testcase:
  var small_array = Array(50);
  var big_array = Array(4294967290);

With KJS_VERBOSE enabled, it gives:
KJS: new variable small_array: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, : Array (0x804e550)
KJS: new variable big_array: [ Array with 4294967290 elements ] : Array (0x804e668)
instead of looping for months in the big_array printout.

I see that many fixes from Harri in nodes2string.cpp have been reverted too...

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: verbose.diff
Type: text/x-diff
Size: 2375 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/khtml-devel/attachments/20060113/4f7ba9d3/attachment.bin 


More information about the Khtml-devel mailing list