Closed
Bug 983990
Opened 10 years ago
Closed 10 years ago
Convert nsPluginStreamListenerPeer::mDataForwardToRequest to nsDataHashtable<nsUint32HashKey, uint32_t>
Categories
(Core Graveyard :: Plug-ins, defect)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: mccr8, Assigned: anujagarwal464)
References
Details
Attachments
(2 files, 1 obsolete file)
5.76 KB,
patch
|
johns
:
review+
mccr8
:
feedback+
|
Details | Diff | Splinter Review |
28.16 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
The table currently uses 32-bit keys, but it looks like the comments like "XXX support 64-bit offsets" can be addressed by using 64-bit keys and dropping the conversions.
Reporter | ||
Comment 1•10 years ago
|
||
Thanks, let me know if you have any questions!
Assignee: nobody → anujagarwal464
Assignee | ||
Comment 2•10 years ago
|
||
http://mxr.mozilla.org/mozilla-central/source/dom/plugins/base/nsPluginStreamListenerPeer.cpp#849 do we need this now?
Attachment #8391893 -
Flags: feedback?(continuation)
Reporter | ||
Comment 3•10 years ago
|
||
Comment on attachment 8391893 [details] [diff] [review] bug983990.diff Review of attachment 8391893 [details] [diff] [review]: ----------------------------------------------------------------- Looking over the code some more now, I think I gave bad advice about switching things to 64-bit. Sorry about that. I think that for now it makes sense to convert the hash table to nsDataHashtable<nsUint32HashKey, uint32_t>, using absoluteOffset instead of absoluteOffset64. Converting this code properly over to 64-bit will require some wider-ranging code changes, so it makes sense to do that in a separate bug (if that is something that is even still desired). Of course, changing the hash table should make that easier to do. When you update your patch for that, I can take a look at it. ::: dom/plugins/base/nsPluginStreamListenerPeer.cpp @@ +823,2 @@ > int32_t amtForwardToPlugin = > + NS_PTR_TO_INT32(mDataForwardToRequest->Get(absoluteOffset64)); You should be able to get rid of NS_PTR_TO_INT32. I think this was needed because nsHashtable was storing void* as its data, but with nsDataHashtable you'll get the actual int32_t out of it that you need.
Attachment #8391893 -
Flags: feedback?(continuation)
Reporter | ||
Comment 4•10 years ago
|
||
Other than those comments, your patch looks good.
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8391893 -
Attachment is obsolete: true
Attachment #8391920 -
Flags: review?(continuation)
Assignee | ||
Updated•10 years ago
|
Summary: Convert nsPluginStreamListenerPeer::mDataForwardToRequest to nsDataHashtable<nsUint64HashKey, uint32_t> → Convert nsPluginStreamListenerPeer::mDataForwardToRequest to nsDataHashtable<nsUint32HashKey, uint32_t>
Reporter | ||
Comment 6•10 years ago
|
||
Comment on attachment 8391920 [details] [diff] [review] nsDataHashtable<nsUint32HashKey, uint32_t> Review of attachment 8391920 [details] [diff] [review]: ----------------------------------------------------------------- This looks good to me, thanks. I'll forward this to John for a review.
Attachment #8391920 -
Flags: review?(jschoenick)
Attachment #8391920 -
Flags: review?(continuation)
Attachment #8391920 -
Flags: feedback+
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #3) > You should be able to get rid of NS_PTR_TO_INT32. I think this was needed > because nsHashtable was storing void* as its data, but with nsDataHashtable > you'll get the actual int32_t out of it that you need. I will get uint32_t from nsDataHashtable. I think i should type cast it to int32_t before assigning.
Comment 8•10 years ago
|
||
Comment on attachment 8391920 [details] [diff] [review] nsDataHashtable<nsUint32HashKey, uint32_t> Review of attachment 8391920 [details] [diff] [review]: ----------------------------------------------------------------- lgtm ::: dom/plugins/base/nsPluginStreamListenerPeer.cpp @@ +889,5 @@ > int64_t absoluteOffset64 = 0; > brr->GetStartRange(&absoluteOffset64); > // XXX support 64-bit offsets > int32_t absoluteOffset = (int32_t)int64_t(absoluteOffset64); > + Whitespace! Not that this file isn't covered in it.
Attachment #8391920 -
Flags: review?(jschoenick) → review+
Reporter | ||
Comment 9•10 years ago
|
||
I can fix the whitespace when I land it.
Reporter | ||
Comment 10•10 years ago
|
||
Attachment #8392407 -
Flags: review?(jschoenick)
Reporter | ||
Comment 11•10 years ago
|
||
Comment on attachment 8392407 [details] [diff] [review] Remove all trailing whitespace from nsPluginStreamListenerPeer. rs=bsmedberg over IRC
Attachment #8392407 -
Flags: review?(jschoenick) → review+
Reporter | ||
Comment 12•10 years ago
|
||
Thanks! remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/56dc258068bc remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/8fdfcc4878db
Reporter | ||
Comment 13•10 years ago
|
||
try run: https://tbpl.mozilla.org/?tree=Try&rev=659d8f58b430
Comment 14•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/56dc258068bc https://hg.mozilla.org/mozilla-central/rev/8fdfcc4878db
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•