/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* * *Date:10February2003 *SUMMARY:Object.toSource()recursionshouldcheckstackoverflow * *Seehttp://bugzilla.mozilla.org/show_bug.cgi?id=192465 * *MODIFIED:27February2003 * *Weareaddinganearlyreturntothistestcase,sinceitiscausing *bigproblemsonLinuxRedHat8!Foradiscussionofthisissue,see *http://bugzilla.mozilla.org/show_bug.cgi?id=174341#c24 and following. * * *MODIFIED:20March2003 * *Removedtheearlyreturnandchanged|N|belowfrom1000to90. *Note|make_deep_nest(N)|returnsanobjectgraphoflengthN(N+1). *Sothegraphhasnowbeenreducedfrom1,001,000to8190. * *Withthisreduction,thebugstillmanifestsonmyWinNTandLinux *boxes(crashduetostackoverflow).Sothetestcaseisagainofuse *onthoseboxes.Atthesametime,LinuxRedHat8boxescannowrun *thetestinareasonableamountoftime.
*/ //----------------------------------------------------------------------------- var UBound = 0; var BUGNUMBER = 192465; var summary = 'Object.toSource() recursion should check stack overflow'; var status = ''; var statusitems = []; var actual = ''; var actualvalues = []; var expect= ''; var expectedvalues = [];
/* *We'rejusttestingthatthisscriptwillcompileandrun. *Setboth|actual|and|expect|toadummyvalue.
*/
status = inSection(1); var N = 90; try
{
make_deep_nest(N);
} catch (e)
{ // An exception is OK, as the runtime can throw one in response to too deep // recursion. We haven't crashed; good! Continue on to set the dummy values -
}
actual = 1;
expect = 1;
addThis();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.