Closed Bug 801471 Opened 13 years ago Closed 13 years ago

Failed to convert nsresult to HRESULT in nsDataObj.cpp on windows build

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: romaxa, Assigned: romaxa)

References

Details

Attachments

(2 files)

Build fix
Attachment #671271 - Flags: review?(jmathies)
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #671282 - Flags: review?(surkov.alexander)
Version: unspecified → Trunk
Comment on attachment 671282 [details] [diff] [review] One more nsresult vs HRESULT conversion fail r=tbsaunde
Attachment #671282 - Flags: review?(surkov.alexander) → review+
Attachment #671271 - Flags: review?(jmathies) → review+
Blocks: 801579
For personal reference, do nsresult and HRESULT match up enough for a cast between them to be better than just returning a general failure? For example I've done this before: return SUCCEEDED(hr) ? NS_OK : NS_ERROR_FAILURE;
(In reply to Brian R. Bondy [:bbondy] from comment #4) > For personal reference, do nsresult and HRESULT match up enough for a cast > between them to be better than just returning a general failure? > > For example I've done this before: return SUCCEEDED(hr) ? NS_OK : > NS_ERROR_FAILURE; My patch did that. See the duped bug.
Oops ya that's the patch I was looking at.
(In reply to Brian R. Bondy [:bbondy] from comment #4) > For personal reference, do nsresult and HRESULT match up enough for a cast > between them to be better than just returning a general failure? A few specific values agree, like S_OK == NS_OK and E_FAIL == NS_ERROR_FAILURE, but the large majority don't correspond. In particular, all module-specific errors are likely to be totally uncorrelated. However, the only difference between different error codes is so that different reasons for failure can be distinguished. From that perspective, it might be more useful to propagate back the actual error even though it will be bogus as an nsresult, because it will make debugging easier -- if it hits NS_ENSURE_SUCCESS etc. and is printed to the console, or gets back to JS in an exception message.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: