[Webkit-unassigned] [Bug 28185] Inspector: Show Hidden Cookie Data
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 11 20:40:54 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28185
--- Comment #5 from Joseph Pecoraro <joepeck02 at gmail.com> 2009-08-11 20:40:53 PDT ---
(In reply to comment #3)
> You should declare the cookies vector on the same line where you initialize it.
> But, you should not use Vector for a return value; copying it to return it is
> very inefficient. Instead you should name this function getRawCookies and use a
> Vector<Cookie>& as an out parameter.
Done. Made the Vector an out parameter, but that requires the declaration to
again be on another line.
> To avoid making an extra copy of each cookie in the vector this can be a "const
> Cookie&" instead of Cookie.
Done.
> We prefer not to abbreviate, so please say cookieObject.
Done. Noted.
> This will be relatively slow since it's going to create each of these
> identifiers from the constant string each time through the loop, which is a
> hash table lookup every time. It might be good to instead create local
> variables for each identifier so each will be created exactly once. On the
> other hand, the jsString operations are relatively costly too, so it's probably
> not all that important to optimize.
Done. I moved Initializers out and made them const.
> The spaces around the argument are not the correct style.
Done. Including all other style fixes.
> No need for the "const" in "const bool". Would be nice to indent this so the
> lines don't exactly line up with the ":". I often use indent by an extra tab
> stop.
Done.
> For a pure data holder like this, you might want to consider just using a
> struct instead of a class with getter functions.
Done. Made a struct. Including a new field "size" (see below).
> The new include should be added to the paragraph below, not put above the
> file's own header. The file's own header always comes first.
Done. Noted.
> It's a bit strange to put this date into this string form, but I don't have a
> better suggestion at the moment.
Done. Noted.
> Our coding style is to put the * next to the variable name for Objective-C
> types like this one.
Done. Noted.
> This patch will break all platforms other than Mac OS X. You can't land it like
> that, so you'll need to figure out what to do for those other platforms.
Attempted. I searched and identified, hopefully all, other platforms. Most
don't really make support for this easy, and I have no way of testing on them
at all. What is the best course of action for something like this?
------------
I added another field to the Cookie struct, "size". Firebug's "size" parameter
seems to be the (size of the name + size of the value). I decided to put this
into the struct, and then make it available in the constructed jsObjects for
the inspector.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list