Last Comment Bug 783863 - ArchiveInputStream::Tell incorrectly uses mStatus as an nsresult
: ArchiveInputStream::Tell incorrectly uses mStatus as an nsresult
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: Aryeh Gregor (:ayg) (away until October 25)
:
Mentors:
Depends on:
Blocks: nsresult-enum 781153
  Show dependency treegraph
 
Reported: 2012-08-19 02:28 PDT by Aryeh Gregor (:ayg) (away until October 25)
Modified: 2012-08-21 19:10 PDT (History)
2 users (show)
ayg: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (749 bytes, patch)
2012-08-19 02:30 PDT, Aryeh Gregor (:ayg) (away until October 25)
amarchesini: review+
Details | Diff | Splinter Review

Description Aryeh Gregor (:ayg) (away until October 25) 2012-08-19 02:28:55 PDT
Bug 781153 added this:

  NS_IMETHODIMP
  ArchiveInputStream::Tell(PRInt64 *aResult)
  {
    if (NS_FAILED(mStatus))
      return mStatus;

    LL_UI2L(*aResult, mData.cursor);
    return NS_OK;
  }

mStatus is defined as:

   enum {
     NotStarted,
     Started,
     Done
   } mStatus;

So NS_FAILED() will always return false here.
Comment 1 Aryeh Gregor (:ayg) (away until October 25) 2012-08-19 02:30:01 PDT
Created attachment 653157 [details] [diff] [review]
Patch
Comment 2 Johnny Stenback (:jst, jst@mozilla.com) 2012-08-20 09:15:31 PDT
Comment on attachment 653157 [details] [diff] [review]
Patch

This is fine with me, but I'm going to defer the actual review to Andrea who wrote this code.
Comment 3 Andrea Marchesini [:baku] 2012-08-20 09:27:34 PDT
Comment on attachment 653157 [details] [diff] [review]
Patch

right!
Comment 4 Aryeh Gregor (:ayg) (away until October 25) 2012-08-21 04:57:35 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/26da3bdbf618
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-08-21 19:10:33 PDT
https://hg.mozilla.org/mozilla-central/rev/26da3bdbf618

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