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

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

Description Boris Zbarsky [:bz] (TPAC) 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] (TPAC) 2011-08-02 00:02:11 PDT
Created attachment 550014 [details] [diff] [review]
Comment 3 Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-08-02 10:24:24 PDT
Comment on attachment 550014 [details] [diff] [review]

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

Comment 4 Boris Zbarsky [:bz] (TPAC) 2011-08-03 11:35:59 PDT
Comment 5 Marco Bonardo [::mak] 2011-08-04 03:05:33 PDT

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