Simple optimization: don't bother calling markDOMNodesForDocument if the JSDocument was already marked.
Created attachment 12618 [details] patch as described
Comment on attachment 12618 [details] patch as described Our convention is that the caller is responsible for checking !marked() before calling mark(), so this optimization should have no effect. Do you know of a code path that marks a JSDocument before checking !marked()?
Oh, you're right. Nevermind this, closing it out. Just thought I had missed it and wanted to be certain.