Bug 1082554 (part 1) - Remove tools/performance/pageload/, which is ancient and unused. r=jmaher.

--HG--
extra : rebase_source : a1e034264f6c9d5a6ad2ff48f5426a8ec27aa133
This commit is contained in:
Nicholas Nethercote 2014-10-15 17:52:16 -07:00
parent a164f4b49a
commit f14c9c4280
9 changed files with 0 additions and 1917 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,954 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html>
<head>
<!-- MOZ_INSERT_CONTENT_HOOK -->
<META NAME="GENERATOR" CONTENT="lxr-1998-06-10: http://lxr.linux.no">
<title>mozilla/xpcom/ds/nsVoidBTree.cpp</title>
</head>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
<TABLE BGCOLOR="#000000" WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR><TD><A HREF="http://www.mozilla.org/"><IMG
SRC="res/mozilla-banner.gif" ALT=""
BORDER=0 WIDTH=600 HEIGHT=58></A></TD></TR></TABLE>
<TABLE BORDER=0 CELLPADDING=12 CELLSPACING=0 WIDTH="100%">
<TR>
<TD ALIGN=LEFT VALIGN=CENTER>
<NOBR><FONT SIZE="+2"><B>
<A HREF="http://lxr.mozilla.org/seamonkey">Mozilla Cross Reference:</A>
</B></FONT></NOBR><I>seamonkey</I>
<BR><B><a href="/seamonkey/source/">mozilla</a>/ <a href="/seamonkey/source/xpcom/">xpcom</a>/ <a href="/seamonkey/source/xpcom/ds/">ds</a>/ <a href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp">nsVoidBTree.cpp</a> </B>
</TD>
<TD ALIGN=RIGHT VALIGN=TOP WIDTH="1%">
<TABLE BORDER CELLPADDING=12 CELLSPACING=0>
<TR>
<TD NOWRAP BGCOLOR="#FAFAFA">
<A HREF="http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/xpcom/ds/nsVoidBTree.cpp">CVS Log</A><BR>
<A HREF="http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpcom/ds/nsVoidBTree.cpp">CVS Blame</A><BR>
<BR>
</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN=RIGHT VALIGN=TOP WIDTH="1%">
<TABLE BORDER CELLPADDING=6 CELLSPACING=0>
<TR>
<TD BGCOLOR="#FAFAFA">
<TABLE BORDER=0 CELLPADDING=6 CELLSPACING=0>
<TR>
<TD NOWRAP ALIGN=LEFT>
changes to<BR>this file in<BR>the last:
</TD>
<TD NOWRAP>
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla/xpcom/ds/nsVoidBTree.cpp&date=day">day</A><BR>
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla/xpcom/ds/nsVoidBTree.cpp&date=week">week</A><BR>
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla/xpcom/ds/nsVoidBTree.cpp&date=month">month</A><BR>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<pre> <a name=1 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#1">1</a> <b><i>/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */</i></b>
<a name=2 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#2">2</a> <b><i>/*</i></b>
<a name=3 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#3">3</a> <b><i> * The stuff in this file isn't subject to the Don'tBreakMyRelicensingScript</i></b>
<a name=4 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#4">4</a> <b><i> * Version 1.1 (the "MPL"); you may not use this file except in</i></b>
<a name=5 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#5">5</a> <b><i> * compliance with the MPL. You may obtain a copy of the MPL at</i></b>
<a name=6 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#6">6</a> <b><i> * <a href="http://www.mozilla.org/MPL/">http://www.mozilla.org/MPL/</a></i></b>
<a name=7 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#7">7</a> <b><i> *</i></b>
<a name=8 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#8">8</a> <b><i> * Software distributed under the MPL is distributed on an "AS IS" basis,</i></b>
<a name=9 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#9">9</a> <b><i> * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL</i></b>
<a name=10 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#10">10</a> <b><i> * for the specific language governing rights and limitations under the</i></b>
<a name=11 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#11">11</a> <b><i> * MPL.</i></b>
<a name=12 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#12">12</a> <b><i> *</i></b>
<a name=13 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#13">13</a> <b><i> * The Initial Developer of this code under the MPL is Netscape</i></b>
<a name=14 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#14">14</a> <b><i> * Communications Corporation. Portions created by Netscape are</i></b>
<a name=15 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#15">15</a> <b><i> * Copywrong (C) 1999 Netscape Communications Corporation. All Rights</i></b>
<a name=16 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#16">16</a> <b><i> * Reserved.</i></b>
<a name=17 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#17">17</a> <b><i> *</i></b>
<a name=18 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#18">18</a> <b><i> * Original Author:</i></b>
<a name=19 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#19">19</a> <b><i> * Chris Waterson &lt;waterson@netscape.com&gt;</i></b>
<a name=20 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#20">20</a> <b><i> */</i></b>
<a name=21 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#21">21</a>
<a name=22 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#22">22</a> #include "<a href="/seamonkey/source/xpcom/ds/nsVoidBTree.h">nsVoidBTree.h</a>"
<a name=23 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#23">23</a>
<a name=24 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#24">24</a> #ifdef <a href="/seamonkey/ident?i=DEBUG">DEBUG</a>
<a name=25 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#25">25</a> #include &lt;<a href="/seamonkey/source/include/stdio.h">stdio.h</a>&gt;
<a name=26 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#26">26</a> #endif
<a name=27 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#27">27</a>
<a name=28 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#28">28</a> <b><i>// Set this to force the tree to be verified after every insertion and</i></b>
<a name=29 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#29">29</a> <b><i></i></b><b><i>// removal.</i></b>
<a name=30 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#30">30</a> <b><i></i></b><b><i>//#define PARANOID 1</i></b>
<a name=31 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#31">31</a> <b><i></i></b>
<a name=32 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#32">32</a>
<a name=33 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#33">33</a> <b><i>//----------------------------------------------------------------------</i></b>
<a name=34 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#34">34</a> <b><i></i></b><b><i>// nsVoidBTree::Node</i></b>
<a name=35 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#35">35</a> <b><i></i></b><b><i>//</i></b>
<a name=36 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#36">36</a> <b><i></i></b><b><i>// Implementation methods</i></b>
<a name=37 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#37">37</a> <b><i></i></b><b><i>//</i></b>
<a name=38 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#38">38</a> <b><i></i></b>
<a name=39 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#39">39</a> <a href="/seamonkey/ident?i=nsresult">nsresult</a>
<a name=40 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#40">40</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Create">Create</a>(<a href="/seamonkey/ident?i=Type">Type</a> <a href="/seamonkey/ident?i=aType">aType</a>, <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> aCapacity, <a href="/seamonkey/ident?i=Node">Node</a>** <a href="/seamonkey/ident?i=aResult">aResult</a>)
<a name=41 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#41">41</a> {
<a name=42 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#42">42</a> <b><i>// So we only ever have to do one allocation for a Node, we do a</i></b>
<a name=43 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#43">43</a> <b><i></i></b> <b><i>// "naked" heap allocation, computing the size of the node and</i></b>
<a name=44 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#44">44</a> <b><i></i></b> <b><i>// "padding" it out so that it can hold aCapacity slots.</i></b>
<a name=45 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#45">45</a> <b><i></i></b> char* <a href="/seamonkey/ident?i=bytes">bytes</a> = <a href="/seamonkey/ident?i=new">new</a> char[sizeof(<a href="/seamonkey/ident?i=Node">Node</a>) + (aCapacity - 1) * sizeof(void*)];
<a name=46 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#46">46</a> if (! <a href="/seamonkey/ident?i=bytes">bytes</a>)
<a name=47 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#47">47</a> return <a href="/seamonkey/ident?i=NS_ERROR_OUT_OF_MEMORY">NS_ERROR_OUT_OF_MEMORY</a>;
<a name=48 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#48">48</a>
<a name=49 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#49">49</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=result">result</a> = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=bytes">bytes</a>);
<a name=50 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#50">50</a> <a href="/seamonkey/ident?i=result">result</a>-&gt;mBits = 0;
<a name=51 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#51">51</a> <a href="/seamonkey/ident?i=result">result</a>-&gt;<a href="/seamonkey/ident?i=SetType">SetType</a>(<a href="/seamonkey/ident?i=aType">aType</a>);
<a name=52 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#52">52</a>
<a name=53 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#53">53</a> *<a href="/seamonkey/ident?i=aResult">aResult</a> = <a href="/seamonkey/ident?i=result">result</a>;
<a name=54 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#54">54</a> return <a href="/seamonkey/ident?i=NS_OK">NS_OK</a>;
<a name=55 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#55">55</a> }
<a name=56 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#56">56</a>
<a name=57 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#57">57</a> <a href="/seamonkey/ident?i=nsresult">nsresult</a>
<a name=58 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#58">58</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Destroy">Destroy</a>(<a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=aNode">aNode</a>)
<a name=59 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#59">59</a> {
<a name=60 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#60">60</a> char* <a href="/seamonkey/ident?i=bytes">bytes</a> = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(char*, <a href="/seamonkey/ident?i=aNode">aNode</a>);
<a name=61 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#61">61</a> <a href="/seamonkey/ident?i=delete">delete</a>[] <a href="/seamonkey/ident?i=bytes">bytes</a>;
<a name=62 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#62">62</a> return <a href="/seamonkey/ident?i=NS_OK">NS_OK</a>;
<a name=63 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#63">63</a> }
<a name=64 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#64">64</a>
<a name=65 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#65">65</a> void
<a name=66 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#66">66</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=InsertElementAt">InsertElementAt</a>(void* <a href="/seamonkey/ident?i=aElement">aElement</a>, <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a>)
<a name=67 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#67">67</a> {
<a name=68 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#68">68</a> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>(<a href="/seamonkey/ident?i=aIndex">aIndex</a> &gt;= 0 &amp;&amp; <a href="/seamonkey/ident?i=aIndex">aIndex</a> &lt;= <a href="/seamonkey/ident?i=GetCount">GetCount</a>(), <i>"bad index"</i>);
<a name=69 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#69">69</a>
<a name=70 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#70">70</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=71 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#71">71</a> SetCount(<a href="/seamonkey/ident?i=count">count</a> + 1);
<a name=72 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#72">72</a>
<a name=73 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#73">73</a> while (<a href="/seamonkey/ident?i=count">count</a> &gt; <a href="/seamonkey/ident?i=aIndex">aIndex</a>) {
<a name=74 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#74">74</a> mData[<a href="/seamonkey/ident?i=count">count</a>] = mData[<a href="/seamonkey/ident?i=count">count</a> - 1];
<a name=75 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#75">75</a> --<a href="/seamonkey/ident?i=count">count</a>;
<a name=76 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#76">76</a> }
<a name=77 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#77">77</a>
<a name=78 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#78">78</a> mData[<a href="/seamonkey/ident?i=aIndex">aIndex</a>] = <a href="/seamonkey/ident?i=aElement">aElement</a>;
<a name=79 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#79">79</a> }
<a name=80 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#80">80</a>
<a name=81 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#81">81</a> void
<a name=82 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#82">82</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=RemoveElementAt">RemoveElementAt</a>(<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a>)
<a name=83 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#83">83</a> {
<a name=84 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#84">84</a> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>(<a href="/seamonkey/ident?i=aIndex">aIndex</a> &gt;= 0 &amp;&amp; <a href="/seamonkey/ident?i=aIndex">aIndex</a> &lt; <a href="/seamonkey/ident?i=GetCount">GetCount</a>(), <i>"bad index"</i>);
<a name=85 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#85">85</a>
<a name=86 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#86">86</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=87 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#87">87</a> SetCount(<a href="/seamonkey/ident?i=count">count</a> - 1);
<a name=88 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#88">88</a>
<a name=89 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#89">89</a> while (<a href="/seamonkey/ident?i=aIndex">aIndex</a> &lt; <a href="/seamonkey/ident?i=count">count</a>) {
<a name=90 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#90">90</a> mData[<a href="/seamonkey/ident?i=aIndex">aIndex</a>] = mData[<a href="/seamonkey/ident?i=aIndex">aIndex</a> + 1];
<a name=91 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#91">91</a> ++<a href="/seamonkey/ident?i=aIndex">aIndex</a>;
<a name=92 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#92">92</a> }
<a name=93 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#93">93</a> }
<a name=94 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#94">94</a>
<a name=95 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#95">95</a>
<a name=96 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#96">96</a> <b><i>//----------------------------------------------------------------------</i></b>
<a name=97 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#97">97</a> <b><i></i></b><b><i>//</i></b>
<a name=98 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#98">98</a> <b><i></i></b><b><i>// nsVoidBTree::Path</i></b>
<a name=99 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#99">99</a> <b><i></i></b><b><i>//</i></b>
<a name=100 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#100">100</a> <b><i></i></b><b><i>// Implementation methods</i></b>
<a name=101 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#101">101</a> <b><i></i></b><b><i>//</i></b>
<a name=102 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#102">102</a> <b><i></i></b>
<a name=103 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#103">103</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Path">Path</a>::<a href="/seamonkey/ident?i=Path">Path</a>(const <a href="/seamonkey/ident?i=Path">Path</a>&amp; <a href="/seamonkey/ident?i=aOther">aOther</a>)
<a name=104 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#104">104</a> : mTop(<a href="/seamonkey/ident?i=aOther">aOther</a>.mTop)
<a name=105 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#105">105</a> {
<a name=106 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#106">106</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = 0; <a href="/seamonkey/ident?i=i">i</a> &lt; mTop; ++<a href="/seamonkey/ident?i=i">i</a>)
<a name=107 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#107">107</a> mLink[<a href="/seamonkey/ident?i=i">i</a>] = <a href="/seamonkey/ident?i=aOther">aOther</a>.mLink[<a href="/seamonkey/ident?i=i">i</a>];
<a name=108 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#108">108</a> }
<a name=109 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#109">109</a>
<a name=110 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#110">110</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Path">Path</a>&amp;
<a name=111 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#111">111</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Path">Path</a>::operator=(const <a href="/seamonkey/ident?i=Path">Path</a>&amp; <a href="/seamonkey/ident?i=aOther">aOther</a>)
<a name=112 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#112">112</a> {
<a name=113 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#113">113</a> mTop = <a href="/seamonkey/ident?i=aOther">aOther</a>.mTop;
<a name=114 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#114">114</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = 0; <a href="/seamonkey/ident?i=i">i</a> &lt; mTop; ++<a href="/seamonkey/ident?i=i">i</a>)
<a name=115 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#115">115</a> mLink[<a href="/seamonkey/ident?i=i">i</a>] = <a href="/seamonkey/ident?i=aOther">aOther</a>.mLink[<a href="/seamonkey/ident?i=i">i</a>];
<a name=116 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#116">116</a> return *<a href="/seamonkey/ident?i=this">this</a>;
<a name=117 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#117">117</a> }
<a name=118 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#118">118</a>
<a name=119 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#119">119</a> inline <a href="/seamonkey/ident?i=nsresult">nsresult</a>
<a name=120 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#120">120</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Path">Path</a>::<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=aNode">aNode</a>, <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a>)
<a name=121 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#121">121</a> {
<a name=122 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#122">122</a> <b><i>// XXX If you overflow this thing, think about making larger index</i></b>
<a name=123 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#123">123</a> <b><i></i></b> <b><i>// or data nodes. You can pack a _lot_ of data into a pretty flat</i></b>
<a name=124 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#124">124</a> <b><i></i></b> <b><i>// tree.</i></b>
<a name=125 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#125">125</a> <b><i></i></b> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>(mTop &lt;= kMaxDepth, <i>"overflow"</i>);
<a name=126 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#126">126</a> if (mTop &gt; kMaxDepth)
<a name=127 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#127">127</a> return <a href="/seamonkey/ident?i=NS_ERROR_OUT_OF_MEMORY">NS_ERROR_OUT_OF_MEMORY</a>;
<a name=128 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#128">128</a>
<a name=129 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#129">129</a> mLink[mTop].mNode = <a href="/seamonkey/ident?i=aNode">aNode</a>;
<a name=130 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#130">130</a> mLink[mTop].<a href="/seamonkey/ident?i=mIndex">mIndex</a> = <a href="/seamonkey/ident?i=aIndex">aIndex</a>;
<a name=131 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#131">131</a> ++mTop;
<a name=132 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#132">132</a>
<a name=133 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#133">133</a> return <a href="/seamonkey/ident?i=NS_OK">NS_OK</a>;
<a name=134 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#134">134</a> }
<a name=135 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#135">135</a>
<a name=136 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#136">136</a>
<a name=137 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#137">137</a> inline void
<a name=138 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#138">138</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Path">Path</a>::<a href="/seamonkey/ident?i=Pop">Pop</a>(<a href="/seamonkey/ident?i=Node">Node</a>** <a href="/seamonkey/ident?i=aNode">aNode</a>, <a href="/seamonkey/ident?i=PRInt32">PRInt32</a>* <a href="/seamonkey/ident?i=aIndex">aIndex</a>)
<a name=139 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#139">139</a> {
<a name=140 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#140">140</a> --mTop;
<a name=141 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#141">141</a> *<a href="/seamonkey/ident?i=aNode">aNode</a> = mLink[mTop].mNode;
<a name=142 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#142">142</a> *<a href="/seamonkey/ident?i=aIndex">aIndex</a> = mLink[mTop].<a href="/seamonkey/ident?i=mIndex">mIndex</a>;
<a name=143 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#143">143</a> }
<a name=144 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#144">144</a>
<a name=145 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#145">145</a> <b><i>//----------------------------------------------------------------------</i></b>
<a name=146 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#146">146</a> <b><i></i></b><b><i>//</i></b>
<a name=147 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#147">147</a> <b><i></i></b><b><i>// nsVoidBTree methods</i></b>
<a name=148 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#148">148</a> <b><i></i></b><b><i>//</i></b>
<a name=149 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#149">149</a> <b><i></i></b>
<a name=150 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#150">150</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>(const <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>&amp; <a href="/seamonkey/ident?i=aOther">aOther</a>)
<a name=151 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#151">151</a> {
<a name=152 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#152">152</a> ConstIterator <a href="/seamonkey/ident?i=last">last</a> = <a href="/seamonkey/ident?i=aOther">aOther</a>.<a href="/seamonkey/ident?i=Last">Last</a>();
<a name=153 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#153">153</a> for (ConstIterator element = <a href="/seamonkey/ident?i=aOther">aOther</a>.<a href="/seamonkey/ident?i=First">First</a>(); element != <a href="/seamonkey/ident?i=last">last</a>; ++element)
<a name=154 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#154">154</a> <a href="/seamonkey/ident?i=AppendElement">AppendElement</a>(*element);
<a name=155 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#155">155</a> }
<a name=156 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#156">156</a>
<a name=157 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#157">157</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>&amp;
<a name=158 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#158">158</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::operator=(const <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>&amp; <a href="/seamonkey/ident?i=aOther">aOther</a>)
<a name=159 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#159">159</a> {
<a name=160 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#160">160</a> <a href="/seamonkey/ident?i=Clear">Clear</a>();
<a name=161 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#161">161</a> ConstIterator <a href="/seamonkey/ident?i=last">last</a> = <a href="/seamonkey/ident?i=aOther">aOther</a>.<a href="/seamonkey/ident?i=Last">Last</a>();
<a name=162 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#162">162</a> for (ConstIterator element = <a href="/seamonkey/ident?i=aOther">aOther</a>.<a href="/seamonkey/ident?i=First">First</a>(); element != <a href="/seamonkey/ident?i=last">last</a>; ++element)
<a name=163 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#163">163</a> <a href="/seamonkey/ident?i=AppendElement">AppendElement</a>(*element);
<a name=164 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#164">164</a> return *<a href="/seamonkey/ident?i=this">this</a>;
<a name=165 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#165">165</a> }
<a name=166 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#166">166</a>
<a name=167 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#167">167</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a>
<a name=168 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#168">168</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Count">Count</a>() const
<a name=169 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#169">169</a> {
<a name=170 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#170">170</a> if (<a href="/seamonkey/ident?i=IsEmpty">IsEmpty</a>())
<a name=171 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#171">171</a> return 0;
<a name=172 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#172">172</a>
<a name=173 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#173">173</a> if (IsSingleElement())
<a name=174 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#174">174</a> return 1;
<a name=175 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#175">175</a>
<a name=176 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#176">176</a> <a href="/seamonkey/ident?i=Node">Node</a>* root = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask);
<a name=177 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#177">177</a> return root-&gt;GetSubTreeSize();
<a name=178 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#178">178</a> }
<a name=179 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#179">179</a>
<a name=180 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#180">180</a> void*
<a name=181 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#181">181</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=ElementAt">ElementAt</a>(<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a>) const
<a name=182 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#182">182</a> {
<a name=183 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#183">183</a> if (<a href="/seamonkey/ident?i=aIndex">aIndex</a> &lt; 0 || <a href="/seamonkey/ident?i=aIndex">aIndex</a> &gt;= <a href="/seamonkey/ident?i=Count">Count</a>())
<a name=184 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#184">184</a> return <a href="/seamonkey/ident?i=nullptr">nullptr</a>;
<a name=185 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#185">185</a>
<a name=186 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#186">186</a> if (IsSingleElement())
<a name=187 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#187">187</a> return <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(void*, mRoot &amp; kRoot_PointerMask);
<a name=188 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#188">188</a>
<a name=189 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#189">189</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask);
<a name=190 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#190">190</a> while (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() != <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=191 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#191">191</a> <b><i>// We're still in the index. Find the right leaf.</i></b>
<a name=192 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#192">192</a> <b><i></i></b> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=next">next</a> = <a href="/seamonkey/ident?i=nullptr">nullptr</a>;
<a name=193 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#193">193</a>
<a name=194 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#194">194</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=195 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#195">195</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = 0; <a href="/seamonkey/ident?i=i">i</a> &lt; <a href="/seamonkey/ident?i=count">count</a>; ++<a href="/seamonkey/ident?i=i">i</a>) {
<a name=196 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#196">196</a> <a href="/seamonkey/ident?i=Node">Node</a>* child = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=i">i</a>));
<a name=197 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#197">197</a>
<a name=198 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#198">198</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> childcount = child-&gt;GetSubTreeSize();
<a name=199 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#199">199</a> if (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a>(<a href="/seamonkey/ident?i=aIndex">aIndex</a>) &lt; childcount) {
<a name=200 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#200">200</a> <a href="/seamonkey/ident?i=next">next</a> = child;
<a name=201 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#201">201</a> break;
<a name=202 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#202">202</a> }
<a name=203 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#203">203</a>
<a name=204 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#204">204</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a> -= childcount;
<a name=205 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#205">205</a> }
<a name=206 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#206">206</a>
<a name=207 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#207">207</a> if (! <a href="/seamonkey/ident?i=next">next</a>) {
<a name=208 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#208">208</a> <a href="/seamonkey/ident?i=NS_ERROR">NS_ERROR</a>(<i>"corrupted"</i>);
<a name=209 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#209">209</a> return <a href="/seamonkey/ident?i=nullptr">nullptr</a>;
<a name=210 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#210">210</a> }
<a name=211 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#211">211</a>
<a name=212 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#212">212</a> <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=next">next</a>;
<a name=213 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#213">213</a> }
<a name=214 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#214">214</a>
<a name=215 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#215">215</a> return <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=aIndex">aIndex</a>);
<a name=216 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#216">216</a> }
<a name=217 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#217">217</a>
<a name=218 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#218">218</a>
<a name=219 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#219">219</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a>
<a name=220 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#220">220</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=IndexOf">IndexOf</a>(void* aPossibleElement) const
<a name=221 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#221">221</a> {
<a name=222 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#222">222</a> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>((<a href="/seamonkey/ident?i=PRWord">PRWord</a>(aPossibleElement) &amp; ~kRoot_PointerMask) == 0,
<a name=223 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#223">223</a> <i>"uh oh, someone wants to use the pointer bits"</i>);
<a name=224 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#224">224</a>
<a name=225 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#225">225</a> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>(aPossibleElement != <a href="/seamonkey/ident?i=nullptr">nullptr</a>, <i>"nsVoidBTree can't handle null elements"</i>);
<a name=226 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#226">226</a> if (aPossibleElement == <a href="/seamonkey/ident?i=nullptr">nullptr</a>)
<a name=227 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#227">227</a> return -1;
<a name=228 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#228">228</a>
<a name=229 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#229">229</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=result">result</a> = 0;
<a name=230 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#230">230</a> ConstIterator <a href="/seamonkey/ident?i=last">last</a> = <a href="/seamonkey/ident?i=Last">Last</a>();
<a name=231 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#231">231</a> for (ConstIterator element = <a href="/seamonkey/ident?i=First">First</a>(); element != <a href="/seamonkey/ident?i=last">last</a>; ++element, ++<a href="/seamonkey/ident?i=result">result</a>) {
<a name=232 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#232">232</a> if (aPossibleElement == *element)
<a name=233 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#233">233</a> return <a href="/seamonkey/ident?i=result">result</a>;
<a name=234 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#234">234</a> }
<a name=235 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#235">235</a>
<a name=236 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#236">236</a> return -1;
<a name=237 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#237">237</a> }
<a name=238 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#238">238</a>
<a name=239 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#239">239</a>
<a name=240 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#240">240</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a>
<a name=241 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#241">241</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=InsertElementAt">InsertElementAt</a>(void* <a href="/seamonkey/ident?i=aElement">aElement</a>, <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a>)
<a name=242 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#242">242</a> {
<a name=243 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#243">243</a> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>((<a href="/seamonkey/ident?i=PRWord">PRWord</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>) &amp; ~kRoot_PointerMask) == 0,
<a name=244 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#244">244</a> <i>"uh oh, someone wants to use the pointer bits"</i>);
<a name=245 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#245">245</a>
<a name=246 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#246">246</a> if ((<a href="/seamonkey/ident?i=PRWord">PRWord</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>) &amp; ~kRoot_PointerMask) != 0)
<a name=247 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#247">247</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=248 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#248">248</a>
<a name=249 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#249">249</a> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>(<a href="/seamonkey/ident?i=aElement">aElement</a> != <a href="/seamonkey/ident?i=nullptr">nullptr</a>, <i>"nsVoidBTree can't handle null elements"</i>);
<a name=250 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#250">250</a> if (<a href="/seamonkey/ident?i=aElement">aElement</a> == <a href="/seamonkey/ident?i=nullptr">nullptr</a>)
<a name=251 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#251">251</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=252 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#252">252</a>
<a name=253 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#253">253</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=Count">Count</a>();
<a name=254 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#254">254</a>
<a name=255 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#255">255</a> if (<a href="/seamonkey/ident?i=aIndex">aIndex</a> &lt; 0 || <a href="/seamonkey/ident?i=aIndex">aIndex</a> &gt; <a href="/seamonkey/ident?i=count">count</a>)
<a name=256 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#256">256</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=257 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#257">257</a>
<a name=258 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#258">258</a> <a href="/seamonkey/ident?i=nsresult">nsresult</a> <a href="/seamonkey/ident?i=rv">rv</a>;
<a name=259 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#259">259</a>
<a name=260 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#260">260</a> if (IsSingleElement()) {
<a name=261 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#261">261</a> <b><i>// We're only a single element holder, and haven't yet</i></b>
<a name=262 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#262">262</a> <b><i></i></b> <b><i>// "faulted" to create the btree.</i></b>
<a name=263 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#263">263</a> <b><i></i></b>
<a name=264 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#264">264</a> if (<a href="/seamonkey/ident?i=count">count</a> == 0) {
<a name=265 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#265">265</a> <b><i>// If we have *no* elements, then just set the root</i></b>
<a name=266 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#266">266</a> <b><i></i></b> <b><i>// pointer and we're done.</i></b>
<a name=267 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#267">267</a> <b><i></i></b> mRoot = <a href="/seamonkey/ident?i=PRWord">PRWord</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>);
<a name=268 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#268">268</a> return <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=269 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#269">269</a> }
<a name=270 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#270">270</a>
<a name=271 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#271">271</a> <b><i>// If we already had an element, and now we're adding</i></b>
<a name=272 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#272">272</a> <b><i></i></b> <b><i>// another. Fault and start creating the btree.</i></b>
<a name=273 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#273">273</a> <b><i></i></b> void* element = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(void*, mRoot &amp; kRoot_PointerMask);
<a name=274 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#274">274</a>
<a name=275 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#275">275</a> <a href="/seamonkey/ident?i=Node">Node</a>* newroot;
<a name=276 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#276">276</a> <a href="/seamonkey/ident?i=rv">rv</a> = <a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Create">Create</a>(<a href="/seamonkey/ident?i=Node">Node</a>::eType_Data, kDataCapacity, &amp;newroot);
<a name=277 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#277">277</a> if (<a href="/seamonkey/ident?i=NS_FAILED">NS_FAILED</a>(<a href="/seamonkey/ident?i=rv">rv</a>)) return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=278 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#278">278</a>
<a name=279 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#279">279</a> newroot-&gt;<a href="/seamonkey/ident?i=InsertElementAt">InsertElementAt</a>(element, 0);
<a name=280 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#280">280</a> newroot-&gt;SetSubTreeSize(1);
<a name=281 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#281">281</a> SetRoot(newroot);
<a name=282 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#282">282</a> }
<a name=283 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#283">283</a>
<a name=284 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#284">284</a> <a href="/seamonkey/ident?i=Path">Path</a> <a href="/seamonkey/ident?i=path">path</a>;
<a name=285 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#285">285</a>
<a name=286 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#286">286</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask);
<a name=287 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#287">287</a> while (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() != <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=288 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#288">288</a> <b><i>// We're still in the index. Find the right leaf.</i></b>
<a name=289 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#289">289</a> <b><i></i></b> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=next">next</a> = <a href="/seamonkey/ident?i=nullptr">nullptr</a>;
<a name=290 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#290">290</a>
<a name=291 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#291">291</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=292 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#292">292</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = 0; <a href="/seamonkey/ident?i=i">i</a> &lt; <a href="/seamonkey/ident?i=count">count</a>; ++<a href="/seamonkey/ident?i=i">i</a>) {
<a name=293 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#293">293</a> <a href="/seamonkey/ident?i=Node">Node</a>* child = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=i">i</a>));
<a name=294 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#294">294</a>
<a name=295 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#295">295</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> childcount = child-&gt;GetSubTreeSize();
<a name=296 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#296">296</a> if (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a>(<a href="/seamonkey/ident?i=aIndex">aIndex</a>) &lt;= childcount) {
<a name=297 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#297">297</a> <a href="/seamonkey/ident?i=rv">rv</a> = <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=i">i</a> + 1);
<a name=298 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#298">298</a> if (<a href="/seamonkey/ident?i=NS_FAILED">NS_FAILED</a>(<a href="/seamonkey/ident?i=rv">rv</a>)) return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=299 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#299">299</a>
<a name=300 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#300">300</a> <a href="/seamonkey/ident?i=next">next</a> = child;
<a name=301 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#301">301</a> break;
<a name=302 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#302">302</a> }
<a name=303 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#303">303</a>
<a name=304 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#304">304</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a> -= childcount;
<a name=305 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#305">305</a> }
<a name=306 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#306">306</a>
<a name=307 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#307">307</a> if (! <a href="/seamonkey/ident?i=next">next</a>) {
<a name=308 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#308">308</a> <a href="/seamonkey/ident?i=NS_ERROR">NS_ERROR</a>(<i>"corrupted"</i>);
<a name=309 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#309">309</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=310 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#310">310</a> }
<a name=311 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#311">311</a>
<a name=312 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#312">312</a> <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=next">next</a>;
<a name=313 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#313">313</a> }
<a name=314 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#314">314</a>
<a name=315 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#315">315</a> if (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>() &gt;= kDataCapacity) {
<a name=316 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#316">316</a> <b><i>// We just blew the data node's buffer. Create another</i></b>
<a name=317 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#317">317</a> <b><i></i></b> <b><i>// datanode and split.</i></b>
<a name=318 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#318">318</a> <b><i></i></b> <a href="/seamonkey/ident?i=rv">rv</a> = <a href="/seamonkey/ident?i=Split">Split</a>(<a href="/seamonkey/ident?i=path">path</a>, <a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=aElement">aElement</a>, <a href="/seamonkey/ident?i=aIndex">aIndex</a>);
<a name=319 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#319">319</a> if (<a href="/seamonkey/ident?i=NS_FAILED">NS_FAILED</a>(<a href="/seamonkey/ident?i=rv">rv</a>)) return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=320 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#320">320</a> }
<a name=321 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#321">321</a> else {
<a name=322 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#322">322</a> <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=InsertElementAt">InsertElementAt</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>, <a href="/seamonkey/ident?i=aIndex">aIndex</a>);
<a name=323 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#323">323</a> <a href="/seamonkey/ident?i=current">current</a>-&gt;SetSubTreeSize(<a href="/seamonkey/ident?i=current">current</a>-&gt;GetSubTreeSize() + 1);
<a name=324 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#324">324</a> }
<a name=325 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#325">325</a>
<a name=326 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#326">326</a> while (<a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Length">Length</a>() &gt; 0) {
<a name=327 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#327">327</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=index">index</a>;
<a name=328 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#328">328</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Pop">Pop</a>(&amp;<a href="/seamonkey/ident?i=current">current</a>, &amp;<a href="/seamonkey/ident?i=index">index</a>);
<a name=329 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#329">329</a> <a href="/seamonkey/ident?i=current">current</a>-&gt;SetSubTreeSize(<a href="/seamonkey/ident?i=current">current</a>-&gt;GetSubTreeSize() + 1);
<a name=330 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#330">330</a> }
<a name=331 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#331">331</a>
<a name=332 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#332">332</a> #ifdef <a href="/seamonkey/ident?i=PARANOID">PARANOID</a>
<a name=333 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#333">333</a> <a href="/seamonkey/ident?i=Verify">Verify</a>(<a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask));
<a name=334 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#334">334</a> #endif
<a name=335 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#335">335</a>
<a name=336 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#336">336</a> return <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=337 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#337">337</a> }
<a name=338 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#338">338</a>
<a name=339 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#339">339</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a>
<a name=340 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#340">340</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=ReplaceElementAt">ReplaceElementAt</a>(void* <a href="/seamonkey/ident?i=aElement">aElement</a>, <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a>)
<a name=341 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#341">341</a> {
<a name=342 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#342">342</a> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>((<a href="/seamonkey/ident?i=PRWord">PRWord</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>) &amp; ~kRoot_PointerMask) == 0,
<a name=343 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#343">343</a> <i>"uh oh, someone wants to use the pointer bits"</i>);
<a name=344 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#344">344</a>
<a name=345 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#345">345</a> if ((<a href="/seamonkey/ident?i=PRWord">PRWord</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>) &amp; ~kRoot_PointerMask) != 0)
<a name=346 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#346">346</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=347 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#347">347</a>
<a name=348 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#348">348</a> <a href="/seamonkey/ident?i=NS_PRECONDITION">NS_PRECONDITION</a>(<a href="/seamonkey/ident?i=aElement">aElement</a> != <a href="/seamonkey/ident?i=nullptr">nullptr</a>, <i>"nsVoidBTree can't handle null elements"</i>);
<a name=349 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#349">349</a> if (<a href="/seamonkey/ident?i=aElement">aElement</a> == <a href="/seamonkey/ident?i=nullptr">nullptr</a>)
<a name=350 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#350">350</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=351 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#351">351</a>
<a name=352 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#352">352</a> if (<a href="/seamonkey/ident?i=aIndex">aIndex</a> &lt; 0 || <a href="/seamonkey/ident?i=aIndex">aIndex</a> &gt;= <a href="/seamonkey/ident?i=Count">Count</a>())
<a name=353 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#353">353</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=354 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#354">354</a>
<a name=355 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#355">355</a> if (IsSingleElement()) {
<a name=356 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#356">356</a> mRoot = <a href="/seamonkey/ident?i=PRWord">PRWord</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>);
<a name=357 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#357">357</a> return <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=358 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#358">358</a> }
<a name=359 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#359">359</a>
<a name=360 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#360">360</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask);
<a name=361 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#361">361</a> while (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() != <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=362 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#362">362</a> <b><i>// We're still in the index. Find the right leaf.</i></b>
<a name=363 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#363">363</a> <b><i></i></b> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=next">next</a> = <a href="/seamonkey/ident?i=nullptr">nullptr</a>;
<a name=364 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#364">364</a>
<a name=365 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#365">365</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=366 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#366">366</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = 0; <a href="/seamonkey/ident?i=i">i</a> &lt; <a href="/seamonkey/ident?i=count">count</a>; ++<a href="/seamonkey/ident?i=i">i</a>) {
<a name=367 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#367">367</a> <a href="/seamonkey/ident?i=Node">Node</a>* child = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=i">i</a>));
<a name=368 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#368">368</a>
<a name=369 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#369">369</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> childcount = child-&gt;GetSubTreeSize();
<a name=370 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#370">370</a> if (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a>(<a href="/seamonkey/ident?i=aIndex">aIndex</a>) &lt; childcount) {
<a name=371 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#371">371</a> <a href="/seamonkey/ident?i=next">next</a> = child;
<a name=372 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#372">372</a> break;
<a name=373 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#373">373</a> }
<a name=374 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#374">374</a>
<a name=375 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#375">375</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a> -= childcount;
<a name=376 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#376">376</a> }
<a name=377 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#377">377</a>
<a name=378 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#378">378</a> if (! <a href="/seamonkey/ident?i=next">next</a>) {
<a name=379 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#379">379</a> <a href="/seamonkey/ident?i=NS_ERROR">NS_ERROR</a>(<i>"corrupted"</i>);
<a name=380 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#380">380</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=381 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#381">381</a> }
<a name=382 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#382">382</a>
<a name=383 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#383">383</a> <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=next">next</a>;
<a name=384 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#384">384</a> }
<a name=385 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#385">385</a>
<a name=386 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#386">386</a> <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=SetElementAt">SetElementAt</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>, <a href="/seamonkey/ident?i=aIndex">aIndex</a>);
<a name=387 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#387">387</a> return <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=388 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#388">388</a> }
<a name=389 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#389">389</a>
<a name=390 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#390">390</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a>
<a name=391 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#391">391</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=RemoveElement">RemoveElement</a>(void* <a href="/seamonkey/ident?i=aElement">aElement</a>)
<a name=392 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#392">392</a> {
<a name=393 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#393">393</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=index">index</a> = <a href="/seamonkey/ident?i=IndexOf">IndexOf</a>(<a href="/seamonkey/ident?i=aElement">aElement</a>);
<a name=394 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#394">394</a> return (<a href="/seamonkey/ident?i=index">index</a> &gt;= 0) ? <a href="/seamonkey/ident?i=RemoveElementAt">RemoveElementAt</a>(<a href="/seamonkey/ident?i=index">index</a>) : <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=395 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#395">395</a> }
<a name=396 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#396">396</a>
<a name=397 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#397">397</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a>
<a name=398 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#398">398</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=RemoveElementAt">RemoveElementAt</a>(<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a>)
<a name=399 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#399">399</a> {
<a name=400 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#400">400</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=Count">Count</a>();
<a name=401 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#401">401</a>
<a name=402 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#402">402</a> if (<a href="/seamonkey/ident?i=aIndex">aIndex</a> &lt; 0 || <a href="/seamonkey/ident?i=aIndex">aIndex</a> &gt;= <a href="/seamonkey/ident?i=count">count</a>)
<a name=403 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#403">403</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=404 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#404">404</a>
<a name=405 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#405">405</a> if (IsSingleElement()) {
<a name=406 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#406">406</a> <b><i>// We're removing the one and only element</i></b>
<a name=407 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#407">407</a> <b><i></i></b> mRoot = 0;
<a name=408 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#408">408</a> return <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=409 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#409">409</a> }
<a name=410 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#410">410</a>
<a name=411 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#411">411</a> <b><i>// We've got more than one element, and we're removing it.</i></b>
<a name=412 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#412">412</a> <b><i></i></b> <a href="/seamonkey/ident?i=nsresult">nsresult</a> <a href="/seamonkey/ident?i=rv">rv</a>;
<a name=413 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#413">413</a> <a href="/seamonkey/ident?i=Path">Path</a> <a href="/seamonkey/ident?i=path">path</a>;
<a name=414 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#414">414</a>
<a name=415 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#415">415</a> <a href="/seamonkey/ident?i=Node">Node</a>* root = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask);
<a name=416 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#416">416</a>
<a name=417 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#417">417</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a> = root;
<a name=418 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#418">418</a> while (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() != <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=419 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#419">419</a> <b><i>// We're still in the index. Find the right leaf.</i></b>
<a name=420 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#420">420</a> <b><i></i></b> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=next">next</a> = <a href="/seamonkey/ident?i=nullptr">nullptr</a>;
<a name=421 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#421">421</a>
<a name=422 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#422">422</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=423 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#423">423</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = 0; <a href="/seamonkey/ident?i=i">i</a> &lt; <a href="/seamonkey/ident?i=count">count</a>; ++<a href="/seamonkey/ident?i=i">i</a>) {
<a name=424 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#424">424</a> <a href="/seamonkey/ident?i=Node">Node</a>* child = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=i">i</a>));
<a name=425 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#425">425</a>
<a name=426 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#426">426</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> childcount = child-&gt;GetSubTreeSize();
<a name=427 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#427">427</a> if (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a>(<a href="/seamonkey/ident?i=aIndex">aIndex</a>) &lt; childcount) {
<a name=428 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#428">428</a> <a href="/seamonkey/ident?i=rv">rv</a> = <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=i">i</a>);
<a name=429 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#429">429</a> if (<a href="/seamonkey/ident?i=NS_FAILED">NS_FAILED</a>(<a href="/seamonkey/ident?i=rv">rv</a>)) return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=430 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#430">430</a>
<a name=431 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#431">431</a> <a href="/seamonkey/ident?i=next">next</a> = child;
<a name=432 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#432">432</a> break;
<a name=433 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#433">433</a> }
<a name=434 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#434">434</a>
<a name=435 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#435">435</a> <a href="/seamonkey/ident?i=aIndex">aIndex</a> -= childcount;
<a name=436 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#436">436</a> }
<a name=437 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#437">437</a>
<a name=438 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#438">438</a> if (! <a href="/seamonkey/ident?i=next">next</a>) {
<a name=439 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#439">439</a> <a href="/seamonkey/ident?i=NS_ERROR">NS_ERROR</a>(<i>"corrupted"</i>);
<a name=440 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#440">440</a> return <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=441 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#441">441</a> }
<a name=442 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#442">442</a>
<a name=443 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#443">443</a> <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=next">next</a>;
<a name=444 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#444">444</a> }
<a name=445 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#445">445</a>
<a name=446 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#446">446</a> <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=RemoveElementAt">RemoveElementAt</a>(<a href="/seamonkey/ident?i=aIndex">aIndex</a>);
<a name=447 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#447">447</a>
<a name=448 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#448">448</a> while ((<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>() == 0) &amp;&amp; (<a href="/seamonkey/ident?i=current">current</a> != root)) {
<a name=449 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#449">449</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=doomed">doomed</a> = <a href="/seamonkey/ident?i=current">current</a>;
<a name=450 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#450">450</a>
<a name=451 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#451">451</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=index">index</a>;
<a name=452 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#452">452</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Pop">Pop</a>(&amp;<a href="/seamonkey/ident?i=current">current</a>, &amp;<a href="/seamonkey/ident?i=index">index</a>);
<a name=453 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#453">453</a> <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=RemoveElementAt">RemoveElementAt</a>(<a href="/seamonkey/ident?i=index">index</a>);
<a name=454 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#454">454</a>
<a name=455 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#455">455</a> <a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Destroy">Destroy</a>(<a href="/seamonkey/ident?i=doomed">doomed</a>);
<a name=456 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#456">456</a> }
<a name=457 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#457">457</a>
<a name=458 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#458">458</a> <a href="/seamonkey/ident?i=current">current</a>-&gt;SetSubTreeSize(<a href="/seamonkey/ident?i=current">current</a>-&gt;GetSubTreeSize() - 1);
<a name=459 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#459">459</a>
<a name=460 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#460">460</a> while (<a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Length">Length</a>() &gt; 0) {
<a name=461 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#461">461</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=index">index</a>;
<a name=462 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#462">462</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Pop">Pop</a>(&amp;<a href="/seamonkey/ident?i=current">current</a>, &amp;<a href="/seamonkey/ident?i=index">index</a>);
<a name=463 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#463">463</a> <a href="/seamonkey/ident?i=current">current</a>-&gt;SetSubTreeSize(<a href="/seamonkey/ident?i=current">current</a>-&gt;GetSubTreeSize() - 1);
<a name=464 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#464">464</a> }
<a name=465 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#465">465</a>
<a name=466 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#466">466</a> while ((root-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Index) &amp;&amp; (root-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>() == 1)) {
<a name=467 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#467">467</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=doomed">doomed</a> = root;
<a name=468 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#468">468</a> root = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, root-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(0));
<a name=469 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#469">469</a> SetRoot(root);
<a name=470 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#470">470</a> <a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Destroy">Destroy</a>(<a href="/seamonkey/ident?i=doomed">doomed</a>);
<a name=471 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#471">471</a> }
<a name=472 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#472">472</a>
<a name=473 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#473">473</a> #ifdef <a href="/seamonkey/ident?i=PARANOID">PARANOID</a>
<a name=474 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#474">474</a> <a href="/seamonkey/ident?i=Verify">Verify</a>(root);
<a name=475 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#475">475</a> #endif
<a name=476 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#476">476</a>
<a name=477 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#477">477</a> return <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=478 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#478">478</a> }
<a name=479 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#479">479</a>
<a name=480 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#480">480</a> void
<a name=481 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#481">481</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Clear">Clear</a>(void)
<a name=482 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#482">482</a> {
<a name=483 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#483">483</a> if (<a href="/seamonkey/ident?i=IsEmpty">IsEmpty</a>())
<a name=484 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#484">484</a> return;
<a name=485 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#485">485</a>
<a name=486 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#486">486</a> if (! IsSingleElement()) {
<a name=487 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#487">487</a> <a href="/seamonkey/ident?i=Node">Node</a>* root = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask);
<a name=488 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#488">488</a>
<a name=489 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#489">489</a> #ifdef <a href="/seamonkey/ident?i=PARANOID">PARANOID</a>
<a name=490 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#490">490</a> <a href="/seamonkey/ident?i=Dump">Dump</a>(root, 0);
<a name=491 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#491">491</a> #endif
<a name=492 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#492">492</a>
<a name=493 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#493">493</a> <a href="/seamonkey/ident?i=DestroySubtree">DestroySubtree</a>(root);
<a name=494 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#494">494</a> }
<a name=495 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#495">495</a>
<a name=496 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#496">496</a> mRoot = 0;
<a name=497 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#497">497</a> }
<a name=498 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#498">498</a>
<a name=499 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#499">499</a>
<a name=500 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#500">500</a> void
<a name=501 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#501">501</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Compact">Compact</a>(void)
<a name=502 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#502">502</a> {
<a name=503 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#503">503</a> <b><i>// XXX We could go through and try to merge datanodes.</i></b>
<a name=504 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#504">504</a> <b><i></i></b>}
<a name=505 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#505">505</a>
<a name=506 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#506">506</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a>
<a name=507 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#507">507</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=EnumerateForwards">EnumerateForwards</a>(EnumFunc <a href="/seamonkey/ident?i=aFunc">aFunc</a>, void* <a href="/seamonkey/ident?i=aData">aData</a>) const
<a name=508 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#508">508</a> {
<a name=509 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#509">509</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a> running = <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=510 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#510">510</a>
<a name=511 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#511">511</a> ConstIterator <a href="/seamonkey/ident?i=last">last</a> = <a href="/seamonkey/ident?i=Last">Last</a>();
<a name=512 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#512">512</a> for (ConstIterator element = <a href="/seamonkey/ident?i=First">First</a>(); running &amp;&amp; element != <a href="/seamonkey/ident?i=last">last</a>; ++element)
<a name=513 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#513">513</a> running = (*<a href="/seamonkey/ident?i=aFunc">aFunc</a>)(*element, <a href="/seamonkey/ident?i=aData">aData</a>);
<a name=514 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#514">514</a>
<a name=515 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#515">515</a> return running;
<a name=516 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#516">516</a> }
<a name=517 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#517">517</a>
<a name=518 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#518">518</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a>
<a name=519 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#519">519</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=EnumerateBackwards">EnumerateBackwards</a>(EnumFunc <a href="/seamonkey/ident?i=aFunc">aFunc</a>, void* <a href="/seamonkey/ident?i=aData">aData</a>) const
<a name=520 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#520">520</a> {
<a name=521 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#521">521</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a> running = <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=522 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#522">522</a>
<a name=523 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#523">523</a> ConstIterator element = <a href="/seamonkey/ident?i=Last">Last</a>();
<a name=524 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#524">524</a> ConstIterator <a href="/seamonkey/ident?i=first">first</a> = <a href="/seamonkey/ident?i=First">First</a>();
<a name=525 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#525">525</a>
<a name=526 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#526">526</a> if (element != <a href="/seamonkey/ident?i=first">first</a>) {
<a name=527 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#527">527</a> do {
<a name=528 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#528">528</a> running = (*<a href="/seamonkey/ident?i=aFunc">aFunc</a>)(*--element, <a href="/seamonkey/ident?i=aData">aData</a>);
<a name=529 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#529">529</a> } while (running &amp;&amp; element != <a href="/seamonkey/ident?i=first">first</a>);
<a name=530 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#530">530</a> }
<a name=531 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#531">531</a>
<a name=532 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#532">532</a> return running;
<a name=533 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#533">533</a> }
<a name=534 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#534">534</a>
<a name=535 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#535">535</a>
<a name=536 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#536">536</a> void
<a name=537 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#537">537</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=SizeOf">SizeOf</a>(<a href="/seamonkey/ident?i=nsISizeOfHandler">nsISizeOfHandler</a>* <a href="/seamonkey/ident?i=aHandler">aHandler</a>, <a href="/seamonkey/ident?i=PRUint32">PRUint32</a>* <a href="/seamonkey/ident?i=aResult">aResult</a>) const
<a name=538 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#538">538</a> {
<a name=539 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#539">539</a> if (! <a href="/seamonkey/ident?i=aResult">aResult</a>)
<a name=540 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#540">540</a> return;
<a name=541 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#541">541</a>
<a name=542 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#542">542</a> *<a href="/seamonkey/ident?i=aResult">aResult</a> = sizeof(*<a href="/seamonkey/ident?i=this">this</a>);
<a name=543 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#543">543</a>
<a name=544 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#544">544</a> if (IsSingleElement())
<a name=545 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#545">545</a> return;
<a name=546 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#546">546</a>
<a name=547 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#547">547</a> <a href="/seamonkey/ident?i=Path">Path</a> <a href="/seamonkey/ident?i=path">path</a>;
<a name=548 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#548">548</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask), 0);
<a name=549 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#549">549</a>
<a name=550 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#550">550</a> while (<a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Length">Length</a>()) {
<a name=551 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#551">551</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a>;
<a name=552 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#552">552</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=index">index</a>;
<a name=553 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#553">553</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Pop">Pop</a>(&amp;<a href="/seamonkey/ident?i=current">current</a>, &amp;<a href="/seamonkey/ident?i=index">index</a>);
<a name=554 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#554">554</a>
<a name=555 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#555">555</a> if (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=556 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#556">556</a> *<a href="/seamonkey/ident?i=aResult">aResult</a> += sizeof(<a href="/seamonkey/ident?i=Node">Node</a>) + (sizeof(void*) * (kDataCapacity - 1));
<a name=557 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#557">557</a> }
<a name=558 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#558">558</a> else {
<a name=559 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#559">559</a> *<a href="/seamonkey/ident?i=aResult">aResult</a> += sizeof(<a href="/seamonkey/ident?i=Node">Node</a>) + (sizeof(void*) * (kIndexCapacity - 1));
<a name=560 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#560">560</a>
<a name=561 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#561">561</a> <b><i>// If we're in an index node, and there are still kids to</i></b>
<a name=562 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#562">562</a> <b><i></i></b> <b><i>// traverse, well, traverse 'em.</i></b>
<a name=563 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#563">563</a> <b><i></i></b> if (<a href="/seamonkey/ident?i=index">index</a> &lt; <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>()) {
<a name=564 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#564">564</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=index">index</a> + 1);
<a name=565 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#565">565</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=NS_STATIC_CAST">NS_STATIC_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=index">index</a>)), 0);
<a name=566 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#566">566</a> }
<a name=567 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#567">567</a> }
<a name=568 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#568">568</a> }
<a name=569 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#569">569</a> }
<a name=570 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#570">570</a>
<a name=571 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#571">571</a> <b><i>//----------------------------------------------------------------------</i></b>
<a name=572 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#572">572</a> <b><i></i></b>
<a name=573 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#573">573</a> <a href="/seamonkey/ident?i=nsresult">nsresult</a>
<a name=574 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#574">574</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Split">Split</a>(<a href="/seamonkey/ident?i=Path">Path</a>&amp; <a href="/seamonkey/ident?i=path">path</a>, <a href="/seamonkey/ident?i=Node">Node</a>* aOldNode, void* aElementToInsert, <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> aSplitIndex)
<a name=575 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#575">575</a> {
<a name=576 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#576">576</a> <a href="/seamonkey/ident?i=nsresult">nsresult</a> <a href="/seamonkey/ident?i=rv">rv</a>;
<a name=577 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#577">577</a>
<a name=578 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#578">578</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> capacity = (aOldNode-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) ? kDataCapacity : kIndexCapacity;
<a name=579 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#579">579</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=delta">delta</a> = 0;
<a name=580 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#580">580</a>
<a name=581 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#581">581</a>
<a name=582 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#582">582</a> <a href="/seamonkey/ident?i=Node">Node</a>* newnode;
<a name=583 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#583">583</a> <a href="/seamonkey/ident?i=rv">rv</a> = <a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Create">Create</a>(aOldNode-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>(), capacity, &amp;newnode);
<a name=584 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#584">584</a> if (<a href="/seamonkey/ident?i=NS_FAILED">NS_FAILED</a>(<a href="/seamonkey/ident?i=rv">rv</a>)) return <a href="/seamonkey/ident?i=rv">rv</a>;
<a name=585 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#585">585</a>
<a name=586 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#586">586</a> if (aSplitIndex == capacity) {
<a name=587 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#587">587</a> <b><i>// If aSplitIndex is the same as the capacity of the node,</i></b>
<a name=588 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#588">588</a> <b><i></i></b> <b><i>// then there'll be nothing to copy from the old node to the</i></b>
<a name=589 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#589">589</a> <b><i></i></b> <b><i>// new node, and the element is really meant to be inserted in</i></b>
<a name=590 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#590">590</a> <b><i></i></b> <b><i>// the newnode. In that case, do it _now_ so that newnode's</i></b>
<a name=591 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#591">591</a> <b><i></i></b> <b><i>// subtree size will be correct.</i></b>
<a name=592 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#592">592</a> <b><i></i></b> newnode-&gt;<a href="/seamonkey/ident?i=InsertElementAt">InsertElementAt</a>(aElementToInsert, 0);
<a name=593 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#593">593</a>
<a name=594 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#594">594</a> if (newnode-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=595 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#595">595</a> newnode-&gt;SetSubTreeSize(1);
<a name=596 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#596">596</a> }
<a name=597 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#597">597</a> else {
<a name=598 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#598">598</a> <a href="/seamonkey/ident?i=Node">Node</a>* child = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, aElementToInsert);
<a name=599 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#599">599</a> newnode-&gt;SetSubTreeSize(child-&gt;GetSubTreeSize());
<a name=600 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#600">600</a> }
<a name=601 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#601">601</a> }
<a name=602 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#602">602</a> else {
<a name=603 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#603">603</a> <b><i>// We're meant to insert the element into the oldnode at</i></b>
<a name=604 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#604">604</a> <b><i></i></b> <b><i>// aSplitIndex. Copy data from aOldNode to the newnode but</i></b>
<a name=605 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#605">605</a> <b><i></i></b> <b><i>// _don't_ insert newnode yet. We may need to recursively</i></b>
<a name=606 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#606">606</a> <b><i></i></b> <b><i>// split parents, an operation that allocs, and hence, may</i></b>
<a name=607 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#607">607</a> <b><i></i></b> <b><i>// fail. If it does fail, we wan't to not screw up the</i></b>
<a name=608 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#608">608</a> <b><i></i></b> <b><i>// existing datastructure.</i></b>
<a name=609 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#609">609</a> <b><i></i></b> <b><i>//</i></b>
<a name=610 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#610">610</a> <b><i></i></b> <b><i>// Note that it should be the case that count == capacity, but</i></b>
<a name=611 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#611">611</a> <b><i></i></b> <b><i>// who knows, we may decide at some point to prematurely split</i></b>
<a name=612 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#612">612</a> <b><i></i></b> <b><i>// nodes for some reason or another.</i></b>
<a name=613 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#613">613</a> <b><i></i></b> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = aOldNode-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=614 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#614">614</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = aSplitIndex;
<a name=615 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#615">615</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=j">j</a> = 0;
<a name=616 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#616">616</a>
<a name=617 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#617">617</a> newnode-&gt;SetCount(<a href="/seamonkey/ident?i=count">count</a> - aSplitIndex);
<a name=618 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#618">618</a> while (<a href="/seamonkey/ident?i=i">i</a> &lt; <a href="/seamonkey/ident?i=count">count</a>) {
<a name=619 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#619">619</a> if (aOldNode-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=620 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#620">620</a> ++<a href="/seamonkey/ident?i=delta">delta</a>;
<a name=621 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#621">621</a> }
<a name=622 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#622">622</a> else {
<a name=623 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#623">623</a> <a href="/seamonkey/ident?i=Node">Node</a>* migrating = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, aOldNode-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=i">i</a>));
<a name=624 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#624">624</a> <a href="/seamonkey/ident?i=delta">delta</a> += migrating-&gt;GetSubTreeSize();
<a name=625 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#625">625</a> }
<a name=626 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#626">626</a>
<a name=627 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#627">627</a> newnode-&gt;<a href="/seamonkey/ident?i=SetElementAt">SetElementAt</a>(aOldNode-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=i">i</a>), <a href="/seamonkey/ident?i=j">j</a>);
<a name=628 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#628">628</a> ++<a href="/seamonkey/ident?i=i">i</a>;
<a name=629 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#629">629</a> ++<a href="/seamonkey/ident?i=j">j</a>;
<a name=630 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#630">630</a> }
<a name=631 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#631">631</a> newnode-&gt;SetSubTreeSize(<a href="/seamonkey/ident?i=delta">delta</a>);
<a name=632 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#632">632</a> }
<a name=633 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#633">633</a>
<a name=634 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#634">634</a> <b><i>// Now we split the node.</i></b>
<a name=635 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#635">635</a> <b><i></i></b>
<a name=636 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#636">636</a> if (<a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Length">Length</a>() == 0) {
<a name=637 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#637">637</a> <b><i>// We made it all the way up to the root! Ok, so, create a new</i></b>
<a name=638 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#638">638</a> <b><i></i></b> <b><i>// root</i></b>
<a name=639 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#639">639</a> <b><i></i></b> <a href="/seamonkey/ident?i=Node">Node</a>* newroot;
<a name=640 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#640">640</a> <a href="/seamonkey/ident?i=rv">rv</a> = <a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Create">Create</a>(<a href="/seamonkey/ident?i=Node">Node</a>::eType_Index, kIndexCapacity, &amp;newroot);
<a name=641 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#641">641</a> if (<a href="/seamonkey/ident?i=NS_FAILED">NS_FAILED</a>(<a href="/seamonkey/ident?i=rv">rv</a>)) return <a href="/seamonkey/ident?i=rv">rv</a>;
<a name=642 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#642">642</a>
<a name=643 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#643">643</a> newroot-&gt;SetCount(2);
<a name=644 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#644">644</a> newroot-&gt;<a href="/seamonkey/ident?i=SetElementAt">SetElementAt</a>(aOldNode, 0);
<a name=645 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#645">645</a> newroot-&gt;<a href="/seamonkey/ident?i=SetElementAt">SetElementAt</a>(newnode, 1);
<a name=646 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#646">646</a> newroot-&gt;SetSubTreeSize(aOldNode-&gt;GetSubTreeSize() + 1);
<a name=647 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#647">647</a> SetRoot(newroot);
<a name=648 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#648">648</a> }
<a name=649 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#649">649</a> else {
<a name=650 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#650">650</a> <b><i>// Otherwise, use the "path" to pop off the next thing above us.</i></b>
<a name=651 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#651">651</a> <b><i></i></b> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=parent">parent</a>;
<a name=652 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#652">652</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> indx;
<a name=653 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#653">653</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Pop">Pop</a>(&amp;<a href="/seamonkey/ident?i=parent">parent</a>, &amp;indx);
<a name=654 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#654">654</a>
<a name=655 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#655">655</a> if (<a href="/seamonkey/ident?i=parent">parent</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>() &gt;= kIndexCapacity) {
<a name=656 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#656">656</a> <b><i>// Parent is full, too. Recursively split it.</i></b>
<a name=657 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#657">657</a> <b><i></i></b> <a href="/seamonkey/ident?i=rv">rv</a> = <a href="/seamonkey/ident?i=Split">Split</a>(<a href="/seamonkey/ident?i=path">path</a>, <a href="/seamonkey/ident?i=parent">parent</a>, newnode, indx);
<a name=658 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#658">658</a> if (<a href="/seamonkey/ident?i=NS_FAILED">NS_FAILED</a>(<a href="/seamonkey/ident?i=rv">rv</a>)) {
<a name=659 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#659">659</a> <a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Destroy">Destroy</a>(newnode);
<a name=660 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#660">660</a> return <a href="/seamonkey/ident?i=rv">rv</a>;
<a name=661 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#661">661</a> }
<a name=662 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#662">662</a> }
<a name=663 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#663">663</a> else {
<a name=664 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#664">664</a> <b><i>// Room in the parent, so just smack it on up there.</i></b>
<a name=665 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#665">665</a> <b><i></i></b> <a href="/seamonkey/ident?i=parent">parent</a>-&gt;<a href="/seamonkey/ident?i=InsertElementAt">InsertElementAt</a>(newnode, indx);
<a name=666 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#666">666</a> <a href="/seamonkey/ident?i=parent">parent</a>-&gt;SetSubTreeSize(<a href="/seamonkey/ident?i=parent">parent</a>-&gt;GetSubTreeSize() + 1);
<a name=667 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#667">667</a> }
<a name=668 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#668">668</a> }
<a name=669 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#669">669</a>
<a name=670 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#670">670</a> <b><i>// Now, since all our operations that might fail have finished, we</i></b>
<a name=671 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#671">671</a> <b><i></i></b> <b><i>// can go ahead and monkey with the old node.</i></b>
<a name=672 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#672">672</a> <b><i></i></b>
<a name=673 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#673">673</a> if (aSplitIndex == capacity) {
<a name=674 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#674">674</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> nodeslost = newnode-&gt;GetSubTreeSize() - 1;
<a name=675 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#675">675</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> subtreesize = aOldNode-&gt;GetSubTreeSize() - nodeslost;
<a name=676 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#676">676</a> aOldNode-&gt;SetSubTreeSize(subtreesize);
<a name=677 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#677">677</a> }
<a name=678 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#678">678</a> else {
<a name=679 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#679">679</a> aOldNode-&gt;SetCount(aSplitIndex);
<a name=680 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#680">680</a> aOldNode-&gt;<a href="/seamonkey/ident?i=InsertElementAt">InsertElementAt</a>(aElementToInsert, aSplitIndex);
<a name=681 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#681">681</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> subtreesize = aOldNode-&gt;GetSubTreeSize() - <a href="/seamonkey/ident?i=delta">delta</a> + 1;
<a name=682 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#682">682</a> aOldNode-&gt;SetSubTreeSize(subtreesize);
<a name=683 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#683">683</a> }
<a name=684 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#684">684</a>
<a name=685 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#685">685</a> return <a href="/seamonkey/ident?i=NS_OK">NS_OK</a>;
<a name=686 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#686">686</a> }
<a name=687 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#687">687</a>
<a name=688 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#688">688</a>
<a name=689 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#689">689</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a>
<a name=690 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#690">690</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Verify">Verify</a>(<a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=aNode">aNode</a>)
<a name=691 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#691">691</a> {
<a name=692 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#692">692</a> <b><i>// Sanity check the tree by verifying that the subtree sizes all</i></b>
<a name=693 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#693">693</a> <b><i></i></b> <b><i>// add up correctly.</i></b>
<a name=694 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#694">694</a> <b><i></i></b> if (<a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=695 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#695">695</a> <a href="/seamonkey/ident?i=NS_ASSERTION">NS_ASSERTION</a>(<a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>() == <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;GetSubTreeSize(), <i>"corrupted"</i>);
<a name=696 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#696">696</a> return <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=697 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#697">697</a> }
<a name=698 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#698">698</a>
<a name=699 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#699">699</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> childcount = 0;
<a name=700 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#700">700</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = 0; <a href="/seamonkey/ident?i=i">i</a> &lt; <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>(); ++<a href="/seamonkey/ident?i=i">i</a>) {
<a name=701 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#701">701</a> <a href="/seamonkey/ident?i=Node">Node</a>* child = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=i">i</a>));
<a name=702 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#702">702</a> childcount += <a href="/seamonkey/ident?i=Verify">Verify</a>(child);
<a name=703 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#703">703</a> }
<a name=704 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#704">704</a>
<a name=705 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#705">705</a> <a href="/seamonkey/ident?i=NS_ASSERTION">NS_ASSERTION</a>(childcount == <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;GetSubTreeSize(), <i>"corrupted"</i>);
<a name=706 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#706">706</a> return childcount;
<a name=707 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#707">707</a> }
<a name=708 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#708">708</a>
<a name=709 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#709">709</a>
<a name=710 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#710">710</a> void
<a name=711 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#711">711</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=DestroySubtree">DestroySubtree</a>(<a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=aNode">aNode</a>)
<a name=712 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#712">712</a> {
<a name=713 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#713">713</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>() - 1;
<a name=714 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#714">714</a> while (<a href="/seamonkey/ident?i=count">count</a> &gt;= 0) {
<a name=715 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#715">715</a> if (<a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Index)
<a name=716 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#716">716</a> <a href="/seamonkey/ident?i=DestroySubtree">DestroySubtree</a>(<a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=count">count</a>)));
<a name=717 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#717">717</a>
<a name=718 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#718">718</a> --<a href="/seamonkey/ident?i=count">count</a>;
<a name=719 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#719">719</a> }
<a name=720 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#720">720</a>
<a name=721 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#721">721</a> <a href="/seamonkey/ident?i=Node">Node</a>::<a href="/seamonkey/ident?i=Destroy">Destroy</a>(<a href="/seamonkey/ident?i=aNode">aNode</a>);
<a name=722 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#722">722</a> }
<a name=723 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#723">723</a>
<a name=724 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#724">724</a> #ifdef <a href="/seamonkey/ident?i=DEBUG">DEBUG</a>
<a name=725 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#725">725</a> void
<a name=726 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#726">726</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Dump">Dump</a>(<a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=aNode">aNode</a>, <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=aIndent">aIndent</a>)
<a name=727 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#727">727</a> {
<a name=728 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#728">728</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=i">i</a> = 0; <a href="/seamonkey/ident?i=i">i</a> &lt; <a href="/seamonkey/ident?i=aIndent">aIndent</a>; ++<a href="/seamonkey/ident?i=i">i</a>)
<a name=729 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#729">729</a> <a href="/seamonkey/ident?i=printf">printf</a>(<i>" "</i>);
<a name=730 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#730">730</a>
<a name=731 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#731">731</a> if (<a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=732 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#732">732</a> <a href="/seamonkey/ident?i=printf">printf</a>(<i>"data(%d/%d)\n"</i>, <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>(), <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;GetSubTreeSize());
<a name=733 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#733">733</a> }
<a name=734 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#734">734</a> else {
<a name=735 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#735">735</a> <a href="/seamonkey/ident?i=printf">printf</a>(<i>"index(%d/%d)\n"</i>, <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>(), <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;GetSubTreeSize());
<a name=736 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#736">736</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=j">j</a> = 0; <a href="/seamonkey/ident?i=j">j</a> &lt; <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>(); ++<a href="/seamonkey/ident?i=j">j</a>)
<a name=737 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#737">737</a> <a href="/seamonkey/ident?i=Dump">Dump</a>(<a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=aNode">aNode</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=j">j</a>)), <a href="/seamonkey/ident?i=aIndent">aIndent</a> + 1);
<a name=738 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#738">738</a> }
<a name=739 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#739">739</a> }
<a name=740 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#740">740</a> #endif
<a name=741 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#741">741</a>
<a name=742 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#742">742</a> <b><i>//----------------------------------------------------------------------</i></b>
<a name=743 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#743">743</a> <b><i></i></b><b><i>//</i></b>
<a name=744 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#744">744</a> <b><i></i></b><b><i>// nsVoidBTree::ConstIterator and Iterator methods</i></b>
<a name=745 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#745">745</a> <b><i></i></b><b><i>//</i></b>
<a name=746 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#746">746</a> <b><i></i></b>
<a name=747 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#747">747</a> void* <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=kDummyLast">kDummyLast</a>;
<a name=748 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#748">748</a>
<a name=749 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#749">749</a> void
<a name=750 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#750">750</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::ConstIterator::<a href="/seamonkey/ident?i=Next">Next</a>()
<a name=751 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#751">751</a> {
<a name=752 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#752">752</a> if (mIsSingleton) {
<a name=753 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#753">753</a> mIsExhausted = <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=754 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#754">754</a> return;
<a name=755 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#755">755</a> }
<a name=756 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#756">756</a>
<a name=757 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#757">757</a> <b><i>// Otherwise we're a real b-tree iterator, and we need to pull and</i></b>
<a name=758 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#758">758</a> <b><i></i></b> <b><i>// pop our path stack appropriately to gyrate into the right</i></b>
<a name=759 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#759">759</a> <b><i></i></b> <b><i>// position.</i></b>
<a name=760 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#760">760</a> <b><i></i></b> while (1) {
<a name=761 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#761">761</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a>;
<a name=762 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#762">762</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=index">index</a>;
<a name=763 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#763">763</a> mPath.<a href="/seamonkey/ident?i=Pop">Pop</a>(&amp;<a href="/seamonkey/ident?i=current">current</a>, &amp;<a href="/seamonkey/ident?i=index">index</a>);
<a name=764 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#764">764</a>
<a name=765 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#765">765</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=766 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#766">766</a>
<a name=767 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#767">767</a> <a href="/seamonkey/ident?i=NS_ASSERTION">NS_ASSERTION</a>(<a href="/seamonkey/ident?i=index">index</a> &lt; <a href="/seamonkey/ident?i=count">count</a>, <i>"ran off the end, pal"</i>);
<a name=768 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#768">768</a>
<a name=769 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#769">769</a> if (++<a href="/seamonkey/ident?i=index">index</a> &gt;= <a href="/seamonkey/ident?i=count">count</a>) {
<a name=770 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#770">770</a> <b><i>// XXXwaterson Oh, this is so ugly. I wish I was smart</i></b>
<a name=771 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#771">771</a> <b><i></i></b> <b><i>// enough to figure out a prettier way to do it.</i></b>
<a name=772 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#772">772</a> <b><i></i></b> <b><i>//</i></b>
<a name=773 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#773">773</a> <b><i></i></b> <b><i>// See if we've just iterated past the last element in the</i></b>
<a name=774 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#774">774</a> <b><i></i></b> <b><i>// b-tree, and now need to leave ourselves in the magical</i></b>
<a name=775 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#775">775</a> <b><i></i></b> <b><i>// state that is equal to nsVoidBTree::Last().</i></b>
<a name=776 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#776">776</a> <b><i></i></b> if (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=777 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#777">777</a> <a href="/seamonkey/ident?i=PRBool">PRBool</a> rightmost = <a href="/seamonkey/ident?i=PR_TRUE">PR_TRUE</a>;
<a name=778 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#778">778</a> for (<a href="/seamonkey/ident?i=PRInt32">PRInt32</a> slot = mPath.mTop - 1; slot &gt;= 0; --slot) {
<a name=779 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#779">779</a> const <a href="/seamonkey/ident?i=Link">Link</a>&amp; <a href="/seamonkey/ident?i=link">link</a> = mPath.mLink[slot];
<a name=780 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#780">780</a> if (<a href="/seamonkey/ident?i=link">link</a>.<a href="/seamonkey/ident?i=mIndex">mIndex</a> != <a href="/seamonkey/ident?i=link">link</a>.mNode-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>() - 1) {
<a name=781 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#781">781</a> rightmost = <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=782 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#782">782</a> break;
<a name=783 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#783">783</a> }
<a name=784 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#784">784</a> }
<a name=785 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#785">785</a>
<a name=786 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#786">786</a> if (rightmost) {
<a name=787 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#787">787</a> <b><i>// It's the last one. Make the path look exactly</i></b>
<a name=788 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#788">788</a> <b><i></i></b> <b><i>// like nsVoidBTree::Last().</i></b>
<a name=789 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#789">789</a> <b><i></i></b> mPath.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=index">index</a>);
<a name=790 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#790">790</a> return;
<a name=791 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#791">791</a> }
<a name=792 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#792">792</a> }
<a name=793 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#793">793</a>
<a name=794 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#794">794</a> <b><i>// Otherwise, we just ran off the end of a "middling"</i></b>
<a name=795 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#795">795</a> <b><i></i></b> <b><i>// node. Loop around, to pop back up the b-tree to its</i></b>
<a name=796 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#796">796</a> <b><i></i></b> <b><i>// parent.</i></b>
<a name=797 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#797">797</a> <b><i></i></b> continue;
<a name=798 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#798">798</a> }
<a name=799 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#799">799</a>
<a name=800 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#800">800</a> <b><i>// We're somewhere in the middle. Push the new location onto</i></b>
<a name=801 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#801">801</a> <b><i></i></b> <b><i>// the stack.</i></b>
<a name=802 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#802">802</a> <b><i></i></b> mPath.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=index">index</a>);
<a name=803 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#803">803</a>
<a name=804 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#804">804</a> <b><i>// If we're in a data node, we're done: break out of the loop</i></b>
<a name=805 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#805">805</a> <b><i></i></b> <b><i>// here leaving the top of the stack pointing to the next data</i></b>
<a name=806 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#806">806</a> <b><i></i></b> <b><i>// element in the b-tree.</i></b>
<a name=807 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#807">807</a> <b><i></i></b> if (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data)
<a name=808 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#808">808</a> break;
<a name=809 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#809">809</a>
<a name=810 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#810">810</a> <b><i>// Otherwise, we're still in an index node. Push next node</i></b>
<a name=811 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#811">811</a> <b><i></i></b> <b><i>// down onto the stack, starting "one off" to the left, and</i></b>
<a name=812 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#812">812</a> <b><i></i></b> <b><i>// continue around.</i></b>
<a name=813 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#813">813</a> <b><i></i></b> mPath.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=NS_STATIC_CAST">NS_STATIC_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=index">index</a>)), -1);
<a name=814 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#814">814</a> }
<a name=815 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#815">815</a> }
<a name=816 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#816">816</a>
<a name=817 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#817">817</a> void
<a name=818 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#818">818</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::ConstIterator::<a href="/seamonkey/ident?i=Prev">Prev</a>()
<a name=819 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#819">819</a> {
<a name=820 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#820">820</a> if (mIsSingleton) {
<a name=821 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#821">821</a> mIsExhausted = <a href="/seamonkey/ident?i=PR_FALSE">PR_FALSE</a>;
<a name=822 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#822">822</a> return;
<a name=823 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#823">823</a> }
<a name=824 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#824">824</a>
<a name=825 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#825">825</a> <b><i>// Otherwise we're a real b-tree iterator, and we need to pull and</i></b>
<a name=826 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#826">826</a> <b><i></i></b> <b><i>// pop our path stack appropriately to gyrate into the right</i></b>
<a name=827 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#827">827</a> <b><i></i></b> <b><i>// position. This is just like nsVoidBTree::ConstIterator::Next(),</i></b>
<a name=828 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#828">828</a> <b><i></i></b> <b><i>// but in reverse.</i></b>
<a name=829 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#829">829</a> <b><i></i></b> while (1) {
<a name=830 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#830">830</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a>;
<a name=831 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#831">831</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=index">index</a>;
<a name=832 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#832">832</a> mPath.<a href="/seamonkey/ident?i=Pop">Pop</a>(&amp;<a href="/seamonkey/ident?i=current">current</a>, &amp;<a href="/seamonkey/ident?i=index">index</a>);
<a name=833 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#833">833</a>
<a name=834 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#834">834</a> <a href="/seamonkey/ident?i=NS_ASSERTION">NS_ASSERTION</a>(<a href="/seamonkey/ident?i=index">index</a> &gt;= 0, <i>"ran off the front, pal"</i>);
<a name=835 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#835">835</a>
<a name=836 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#836">836</a> if (--<a href="/seamonkey/ident?i=index">index</a> &lt; 0)
<a name=837 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#837">837</a> continue;
<a name=838 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#838">838</a>
<a name=839 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#839">839</a> mPath.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=index">index</a>);
<a name=840 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#840">840</a>
<a name=841 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#841">841</a> if (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data)
<a name=842 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#842">842</a> break;
<a name=843 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#843">843</a>
<a name=844 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#844">844</a> <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=NS_STATIC_CAST">NS_STATIC_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=index">index</a>));
<a name=845 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#845">845</a> mPath.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>());
<a name=846 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#846">846</a> }
<a name=847 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#847">847</a> }
<a name=848 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#848">848</a>
<a name=849 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#849">849</a> const <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Path">Path</a>
<a name=850 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#850">850</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::LeftMostPath() const
<a name=851 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#851">851</a> {
<a name=852 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#852">852</a> <a href="/seamonkey/ident?i=Path">Path</a> <a href="/seamonkey/ident?i=path">path</a>;
<a name=853 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#853">853</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask);
<a name=854 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#854">854</a>
<a name=855 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#855">855</a> while (1) {
<a name=856 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#856">856</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, 0);
<a name=857 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#857">857</a>
<a name=858 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#858">858</a> if (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data)
<a name=859 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#859">859</a> break;
<a name=860 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#860">860</a>
<a name=861 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#861">861</a> <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=NS_STATIC_CAST">NS_STATIC_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(0));
<a name=862 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#862">862</a> }
<a name=863 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#863">863</a>
<a name=864 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#864">864</a> return <a href="/seamonkey/ident?i=path">path</a>;
<a name=865 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#865">865</a> }
<a name=866 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#866">866</a>
<a name=867 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#867">867</a>
<a name=868 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#868">868</a> const <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::<a href="/seamonkey/ident?i=Path">Path</a>
<a name=869 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#869">869</a> <a href="/seamonkey/ident?i=nsVoidBTree">nsVoidBTree</a>::RightMostPath() const
<a name=870 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#870">870</a> {
<a name=871 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#871">871</a> <a href="/seamonkey/ident?i=Path">Path</a> <a href="/seamonkey/ident?i=path">path</a>;
<a name=872 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#872">872</a> <a href="/seamonkey/ident?i=Node">Node</a>* <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=NS_REINTERPRET_CAST">NS_REINTERPRET_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, mRoot &amp; kRoot_PointerMask);
<a name=873 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#873">873</a>
<a name=874 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#874">874</a> while (1) {
<a name=875 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#875">875</a> <a href="/seamonkey/ident?i=PRInt32">PRInt32</a> <a href="/seamonkey/ident?i=count">count</a> = <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetCount">GetCount</a>();
<a name=876 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#876">876</a>
<a name=877 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#877">877</a> if (<a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetType">GetType</a>() == <a href="/seamonkey/ident?i=Node">Node</a>::eType_Data) {
<a name=878 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#878">878</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=count">count</a>);
<a name=879 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#879">879</a> break;
<a name=880 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#880">880</a> }
<a name=881 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#881">881</a>
<a name=882 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#882">882</a> <a href="/seamonkey/ident?i=path">path</a>.<a href="/seamonkey/ident?i=Push">Push</a>(<a href="/seamonkey/ident?i=current">current</a>, <a href="/seamonkey/ident?i=count">count</a> - 1);
<a name=883 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#883">883</a> <a href="/seamonkey/ident?i=current">current</a> = <a href="/seamonkey/ident?i=NS_STATIC_CAST">NS_STATIC_CAST</a>(<a href="/seamonkey/ident?i=Node">Node</a>*, <a href="/seamonkey/ident?i=current">current</a>-&gt;<a href="/seamonkey/ident?i=GetElementAt">GetElementAt</a>(<a href="/seamonkey/ident?i=count">count</a> - 1));
<a name=884 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#884">884</a> }
<a name=885 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#885">885</a>
<a name=886 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#886">886</a> return <a href="/seamonkey/ident?i=path">path</a>;
<a name=887 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#887">887</a> }
<a name=888 href="/seamonkey/source/xpcom/ds/nsVoidBTree.cpp#888">888</a> </pre><P>
This page was automatically generated by
<A HREF="/mozilla/source/webtools/lxr/"> LXR</A>.
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,222 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html>
<head>
<!-- MOZ_INSERT_CONTENT_HOOK -->
</head>
<body>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
<p>
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
Just some very plain HTML. Just some very plain HTML. Just some very plain HTML.
</p>
</body>
</html>

View File

@ -1,234 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html>
<script>
var pages = [
"bugzilla.mozilla.org/",
"lxr.mozilla.org/",
"vanilla-page/"
];
var pages_i18n = [];
var NUM_PAGES;
var NUM_CYCLES;
function parseParams() {
var s = document.location.search.substring(1);
var params = s.split('&');
for (var i = 0; i < params.length; ++i) {
var fields = params[i].split('=');
switch (fields[0]) {
case 'cycles':
NUM_CYCLES = (fields[1] - 0);
break;
case 'pages':
NUM_PAGES = (fields[1] - 0);
break;
case 'i18n':
if (fields[1] == '1') {
pages = pages.concat(pages_i18n);
}
break;
}
}
if (!NUM_PAGES)
NUM_PAGES = pages.length;
if (!NUM_CYCLES)
NUM_CYCLES = 5;
}
parseParams();
var timeVals = new Array(NUM_PAGES); // matrix of times
for (var i = 0; i < timeVals.length; ++i) {
timeVals[i] = new Array;
}
var tstart;
var index = 0;
var cycle = 0;
// returns an object with the following properties:
// min : min value of array elements
// max : max value of array elements
// mean : mean value of array elements
// vari : variance computation
// stdd : standard deviation, sqrt(vari)
// indexOfMax : index of max element (the element that is
// removed from the mean computation)
function getArrayStats(ary) {
var r = {};
r.min = ary[0];
r.max = ary[0];
r.indexOfMax = 0;
var sum = 0;
for (var i = 0; i < ary.length; ++i) {
if (ary[i] < r.min) {
r.min = ary[i];
} else if (ary[i] > r.max) {
r.max = ary[i];
r.indexOfMax = i;
}
sum = sum + ary[i];
}
// median
sorted_ary = ary.concat();
sorted_ary.sort();
// remove longest run
sorted_ary.pop();
if (sorted_ary.length%2) {
r.median = sorted_ary[(sorted_ary.length-1)/2];
}else{
var n = Math.floor(sorted_ary.length / 2);
r.median = (sorted_ary[n] + sorted_ary[n + 1]) / 2;
}
// ignore max value when computing mean and stddev
r.mean = (sum - r.max) / (ary.length - 1);
r.vari = 0;
for (var i = 0; i < ary.length; ++i) {
if (i == r.indexOfMax)
continue;
var d = r.mean - ary[i];
r.vari = r.vari + d * d;
}
r.vari = r.vari / (ary.length - 1);
r.stdd = Math.sqrt(r.vari);
return r;
}
function appendTableCol(tr, text) {
var doc = tr.ownerDocument;
var td = doc.createElement("TD");
td.appendChild(doc.createTextNode(text));
tr.appendChild(td);
return td;
}
function dumpReport() {
var all = new Array();
var counter = 0;
for (var i = 0; i < timeVals.length; ++i) {
for (var j = 0; j < timeVals[i].length; ++j) {
all[counter] = timeVals[i][j];
++counter;
}
}
// avg and avg median are cumulative for all the pages
var avgs = new Array();
var medians = new Array();
for (var i = 0; i < timeVals.length; ++i) {
avgs[i] = getArrayStats(timeVals[i]).mean;
medians[i] = getArrayStats(timeVals[i]).median;
}
var avg = getArrayStats(avgs).mean;
var avgmed = getArrayStats(medians).mean;
var r = getArrayStats(all);
dump(
"(tinderbox dropping follows)\n"+
"_x_x_mozilla_page_load,"+avgmed+","+r.max+","+r.min+"\n"+
"_x_x_mozilla_page_load_details,avgmedian|"+avgmed+"|average|"+avg.toFixed(2)+"|minimum|"+r.min+"|maximum|"+r.max+"|stddev|"+r.stdd.toFixed(2)+":"
);
for (var i = 0; i < timeVals.length; ++i) {
r = getArrayStats(timeVals[i]);
dump(
'|'+
i+';'+
pages[i]+';'+
r.median+';'+
r.mean+';'+
r.min+';'+
r.max
);
for (var j = 0; j < timeVals[i].length; ++j) {
dump(
';'+timeVals[i][j]
);
}
}
}
function showReport() {
var doc = frames["content"].document;
var tbody = doc.getElementById("tbody");
for (var i = 0; i < timeVals.length; ++i) {
var tr = doc.createElement("TR");
appendTableCol(tr, pages[i]);
var r = getArrayStats(timeVals[i]);
appendTableCol(tr, r.min.toFixed(2));
appendTableCol(tr, r.max.toFixed(2));
appendTableCol(tr, r.mean.toFixed(2));
appendTableCol(tr, r.stdd.toFixed(2));
appendTableCol(tr, r.median.toFixed(2));
for (var j = 0; j < timeVals[i].length; ++j) {
var tv = timeVals[i][j];
var td = appendTableCol(tr, tv);
if (j == r.indexOfMax)
td.setAttribute("class", "discarded");
}
tbody.appendChild(tr);
}
}
function loadPage(i) {
tstart = new Date();
frames["content"].document.location = "base/" + pages[i] + "index.html";
}
function frameLoad() {
if (cycle == NUM_CYCLES) {
showReport();
dumpReport();
window.close();
return;
}
var tend = new Date();
var href = frames["content"].document.location.href;
if (href == "about:blank")
return;
var tdelta = tend - tstart;
timeVals[index].push(tdelta);
var fields = href.split('/');
var text = (cycle + 1) + ', ' + (index + 1) + ', ' + fields[fields.length - 2] + ", " + tdelta;
var doc = frames["header"].document;
var body = doc.body;
while (body.firstChild)
body.removeChild(body.firstChild);
body.appendChild(doc.createTextNode(text));
if (++index == NUM_PAGES) {
index = 0;
if (++cycle == NUM_CYCLES) {
// display summary
frames["content"].document.location = "report.html";
return;
}
}
window.setTimeout("loadPage(" + index + ")", 500);
}
function init() {
window.resizeTo(800, 800);
window.setTimeout("loadPage(" + index + ")", 500);
}
</script>
<frameset rows="40,*" onload="init()">
<frame name="header" src="header.html">
<frame name="content" src="" onload="frameLoad()">
</frameset>
</html>

View File

@ -1,5 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html><body></body></html>

View File

@ -1,44 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html>
<head>
<style type="text/css">
table {
border-collapse: collapse;
}
thead {
border: solid 1px black;
}
th {
padding-left: 1em;
padding-right: 1em;
}
tr {
border: solid 1px black;
}
td {
padding-left: 1em;
padding-right: 1em;
}
tr > td {
text-align: right;
}
tr > td:first-child {
text-align: left;
}
td.discarded {
color: gray;
}
</style>
</head>
<body>
<table>
<thead>
<tr><th>Page</th><th>Min</th><th>Max</th><th>Mean</th><th>Std</th><th>Median</th><th>Times...</th></tr>
</thead>
<tbody id="tbody"></tbody>
</table>
</body>
</html>

View File

@ -1,34 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html>
<head>
<style type="text/css">
input {
font-family: sans-serif;
border: solid 1px gray;
margin-right: 0px;
margin-left: 0px;
}
input[type="text"] {
width: 3em;
}
table {
border: solid 1px gray;
padding: 0.3em;
margin-bottom: 0.3em;
}
</style>
</head>
<body>
<form action="cycler.html" method="GET">
<table>
<tr><td>Cycles:</td><td><input type="text" name="cycles" value="5"> (number of times to loop over the pages)</td>
<tr><td>Pages:</td><td><input type="text" name="pages" value=""> (only loop over the first N pages; leave blank to loop over all pages)</td>
<tr><td>I18N:</td><td><input type="text" name="i18n" value="0"> (set to "1" to include i18n pages)</td>
</table>
<input type="submit" value="Begin Test">
</form>
</body>
</html>