As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 659530 - Clean up after mutationevents
: Clean up after mutationevents
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Jonas Sicking (:sicking) No longer reading bugmail consistently
: Andrew Overholt [:overholt]
Depends on: 665387
  Show dependency treegraph
Reported: 2011-05-24 18:01 PDT by Jonas Sicking (:sicking) No longer reading bugmail consistently
Modified: 2011-06-19 15:21 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Cleanup (47.61 KB, patch)
2011-05-24 18:01 PDT, Jonas Sicking (:sicking) No longer reading bugmail consistently
bugs: review+
Details | Diff | Splinter Review

Description User image Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-05-24 18:01:53 PDT
Created attachment 534954 [details] [diff] [review]

Bug 650493 simplified our mutationevents a bunch. In particular it got rid of removable script-blockers which means that we can now depend on scripts not executing while there are scriptblockers (gasp!)

As promised, here's the patch to get rid of crufty code that we no longer need because of this.
Comment 1 User image Olli Pettay [:smaug] (review queue closed until backlog cleared) 2011-05-25 08:47:22 PDT
Comment on attachment 534954 [details] [diff] [review]

>-    nsCOMArray<nsIContent> fragChildren;
>-    if (!fragChildren.SetCapacity(count)) {
>-      return NS_ERROR_OUT_OF_MEMORY;
>-    }
>-    PRUint32 i;
>-    for (i = 0; i < count; i++) {
>+    nsAutoTArray<nsCOMPtr<nsIContent>, 50> fragChildren;
>+    fragChildren.SetCapacity(count);
>+    for (PRUint32 i = 0; i < count; i++) {
Nothing to do with this bug, but ok.

We should rename the removeChild* methods which may fire mutation events.
The name should somehow indicate that event may be dispatched.
And for consistency, same for insertchild* methods.
Right now I need to every time look at the source code to see which version of
removeChild is doing what.
Please file a followup bug for this issue.
Comment 2 User image Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-05-25 11:23:49 PDT
Checked in!

Thanks for the quick review.

I filed bug 659706 on the renames.

Note You need to log in before you can comment on or make changes to this bug.