Last Comment Bug 779123 - nsDocShell::GetExtendedOrigin returns false instead of NS_OK
: nsDocShell::GetExtendedOrigin returns false instead of NS_OK
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: All All
: -- minor (vote)
: mozilla17
Assigned To: :Aryeh Gregor (away until August 15)
:
Mentors:
Depends on:
Blocks: 776140 nsresult-enum
  Show dependency treegraph
 
Reported: 2012-07-31 07:28 PDT by :Aryeh Gregor (away until August 15)
Modified: 2012-08-02 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, changes false to NS_OK (956 bytes, patch)
2012-08-01 02:26 PDT, :Aryeh Gregor (away until August 15)
justin.lebar+bug: review+
Details | Diff | Splinter Review

Description :Aryeh Gregor (away until August 15) 2012-07-31 07:28:26 PDT
Bug 776140 added nsDocShell::GetExtendedOrigin, with return value NS_IMETHODIMP.  But it has "NS_ENSURE_TRUE(ssmgr, false)".  This is identical to "NS_ENSURE_TRUE(ssmgr, NS_OK)", but possibly not intended, and at any rate confusing.  Either it should return some type of error, or use NS_OK instead of false.
Comment 1 :Aryeh Gregor (away until August 15) 2012-08-01 02:26:22 PDT
Created attachment 647889 [details] [diff] [review]
Patch, changes false to NS_OK

This is equivalent to the current code, except that it will still work once bug 777292 lands, but was the intent to actually return an error?
Comment 2 :Aryeh Gregor (away until August 15) 2012-08-01 02:27:05 PDT
Comment on attachment 647889 [details] [diff] [review]
Patch, changes false to NS_OK

Sigh, back+forward clears autocomplete=off fields like requestee . . .
Comment 3 Justin Lebar (not reading bugmail) 2012-08-01 06:38:24 PDT
Comment on attachment 647889 [details] [diff] [review]
Patch, changes false to NS_OK

It was likely intended to return an error; can you change it to NS_ERROR_FAILURE?
Comment 4 Jason Duell [:jduell] (needinfo me) 2012-08-01 10:02:46 PDT
Yes, it should return NS_ERROR_FAILURE.
Comment 5 :Aryeh Gregor (away until August 15) 2012-08-02 02:32:37 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/8d9891ef7bcb
Comment 6 Ryan VanderMeulen [:RyanVM] 2012-08-02 19:10:13 PDT
https://hg.mozilla.org/mozilla-central/rev/8d9891ef7bcb

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