Last Comment Bug 653120 - Switch sBlockedScriptRunners to be an nsTArray
: Switch sBlockedScriptRunners to be an nsTArray
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
: P3 normal (vote)
: mozilla8
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-27 08:10 PDT by Boris Zbarsky [:bz]
Modified: 2011-08-04 03:05 PDT (History)
3 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix (5.46 KB, patch)
2011-08-02 00:02 PDT, Boris Zbarsky [:bz]
jonas: review+
Details | Diff | Splinter Review

Description Boris Zbarsky [:bz] 2011-04-27 08:10:06 PDT
Right now this is an nsCOMArray.  Unfortunately, nsCOMArray::RemoveObjectsAt creates a temporary nsVoidArray and such.  And we call sBlockedScriptRunners->RemoveObjectsAt unconditionally.

We should, imo, either switch to an nsTArray of nsCOMPtr or skip the remove call when we have nothing to remove.  Or both.

Jonas, thoughts?
Comment 1 Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-04-27 10:35:22 PDT
Sounds good to me.
Comment 2 Boris Zbarsky [:bz] 2011-08-02 00:02:11 PDT
Created attachment 550014 [details] [diff] [review]
Fix
Comment 3 Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-08-02 10:24:24 PDT
Comment on attachment 550014 [details] [diff] [review]
Fix

Review of attachment 550014 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Comment 5 Marco Bonardo [::mak] 2011-08-04 03:05:33 PDT
http://hg.mozilla.org/mozilla-central/rev/4dd0c8239b2b

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