Last Comment Bug 778104 - NS_IMPL_STRING_ATTR incorrectly uses bool as nsresult
: NS_IMPL_STRING_ATTR incorrectly uses bool as nsresult
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: Aryeh Gregor (:ayg) (next working March 28-April 26)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 742549 nsresult-enum
  Show dependency treegraph
 
Reported: 2012-07-27 05:25 PDT by Aryeh Gregor (:ayg) (next working March 28-April 26)
Modified: 2012-07-31 06:12 PDT (History)
3 users (show)
ayg: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.61 KB, patch)
2012-07-30 03:38 PDT, Aryeh Gregor (:ayg) (next working March 28-April 26)
bzbarsky: review+
Details | Diff | Splinter Review

Description Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-07-27 05:25:00 PDT
Looks like this is due to bug 742549.  NS_IMPL_STRING_ATTR previously called GetAttrHelper, which called GetAttr, ignored the value, and always returned NS_OK.  Bug 742549 changed it to return the result of GetAttr, which is a bool, not nsresult.
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2012-07-27 08:46:54 PDT
Er, oops.  SetAttr and GetAttr have different return types...

The GetAttr case should just always return NS_OK.  Want to patch and I'll review?
Comment 2 Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-07-30 03:38:31 PDT
Created attachment 647115 [details] [diff] [review]
Patch
Comment 3 Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-07-30 03:38:44 PDT
Try: https://tbpl.mozilla.org/?tree=Try&rev=35a0ff8e7053
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2012-07-30 08:08:04 PDT
Comment on attachment 647115 [details] [diff] [review]
Patch

r=me
Comment 5 Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-07-30 09:38:04 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/ac1975f6837b
Comment 6 Ed Morley [:emorley] 2012-07-31 06:12:54 PDT
https://hg.mozilla.org/mozilla-central/rev/ac1975f6837b

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