mainder of <var>stack</var> after removing its top element.</li>
        <li>Let <var>parentId</var> be the result of calling <a>get a stack ID</a> recursively on <var>tail</var>.</li>
        <li>Let <var>frameId</var> be the result of calling <a>get a frame ID</a> on <var>head</var>.</li>
        <li>If <var>frameId</var> is <code>undefined</code>, return <var>parentId</var>.</li>
        <li>Let <var>profilerStack</var> be a new <a>ProfilerStack</a> with <a>ProfilerStack.frameId</a> equal to <var>frameId