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

Patch (1.61 KB, patch)
2012-07-30 03:38 PDT, :Aryeh Gregor (working until September 2)
bzbarsky: review+
Details | Diff | Splinter Review

Description :Aryeh Gregor (working until September 2) 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] 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 (working until September 2) 2012-07-30 03:38:31 PDT
Created attachment 647115 [details] [diff] [review]
Comment 3 :Aryeh Gregor (working until September 2) 2012-07-30 03:38:44 PDT
Comment 4 Boris Zbarsky [:bz] 2012-07-30 08:08:04 PDT
Comment on attachment 647115 [details] [diff] [review]

Comment 5 :Aryeh Gregor (working until September 2) 2012-07-30 09:38:04 PDT
Comment 6 Ed Morley [:emorley] 2012-07-31 06:12:54 PDT

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