Last Comment Bug 692919 - Need to somehow check to make sure that the list returned from GetChildLists doesn't have duplicates
: Need to somehow check to make sure that the list returned from GetChildLists ...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla10
Assigned To: :Ehsan Akhgari (busy, don't ask for review please)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-07 13:42 PDT by :Ehsan Akhgari (busy, don't ask for review please)
Modified: 2011-10-14 03:57 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (v1) (1.64 KB, patch)
2011-10-07 15:26 PDT, :Ehsan Akhgari (busy, don't ask for review please)
no flags Details | Diff | Review
Patch (v2) (1.09 KB, patch)
2011-10-12 08:19 PDT, :Ehsan Akhgari (busy, don't ask for review please)
mats: review+
Details | Diff | Review

Description :Ehsan Akhgari (busy, don't ask for review please) 2011-10-07 13:42:51 PDT
In order to prevent the likes of bug 691824 in the future.  Where do you guys think it would make sense for that check to live?  (Anything I can think of involves adding it to multiple places)
Comment 1 Mats Palmgren (:mats) 2011-10-07 14:15:04 PDT
After GetChildLists here should cover most consumers I think:
http://mxr.mozilla.org/mozilla-central/source/layout/generic/FrameChildList.cpp#49
Comment 2 :Ehsan Akhgari (busy, don't ask for review please) 2011-10-07 15:26:52 PDT
Created attachment 565673 [details] [diff] [review]
Patch (v1)
Comment 3 :Ehsan Akhgari (busy, don't ask for review please) 2011-10-07 15:27:42 PDT
http://tbpl.mozilla.org/?tree=Try&rev=a2a41ffd3ba3
Comment 4 Mats Palmgren (:mats) 2011-10-07 16:42:05 PDT
Comment on attachment 565673 [details] [diff] [review]
Patch (v1)

Couldn't you just loop through mLists and build a FrameChildListIDs
using |= mID after asserting you haven't seen it yet with !Contains(mID)
Comment 5 :Ehsan Akhgari (busy, don't ask for review please) 2011-10-12 08:19:19 PDT
Created attachment 566536 [details] [diff] [review]
Patch (v2)

Done.
Comment 6 Mats Palmgren (:mats) 2011-10-12 15:48:24 PDT
Comment on attachment 566536 [details] [diff] [review]
Patch (v2)

Let's take the opportunity to add a constructor for the empty set:
  FrameChildListIDs() : mIDs(0) {}

I think it's useful to have in the public part of the API.
(use it for 'ids')

r=mats
Comment 7 :Ehsan Akhgari (busy, don't ask for review please) 2011-10-13 05:40:35 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/a375341a2a07
Comment 8 Ed Morley [:emorley] 2011-10-14 03:57:47 PDT
https://hg.mozilla.org/mozilla-central/rev/a375341a2a07

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