313
edits
No edit summary |
(new intro for new plan) |
||
Line 1: | Line 1: | ||
This is a discussion and planning document for refactoring [[Mozilla | This is a discussion and planning document for refactoring [[Mozilla]] to use C++ exceptions. Exceptions will likely arrive after Mozilla 2, but we hope to improve out-of-memory (OOM) handling for Mozilla 2 and maybe take a few steps closer to exception safety. | ||
Originally, this page suggested the goal would be to enable exceptions while preserving current behavior. But it looks like preserving current behavior exactly would make the code too ugly (e.g., needing try statements with empty catch blocks for ignored error codes), defeating the main purpose of going to exceptions. The new goal is to go more slowly, improving error handling functionality and cleaning up the code so it looks really nice once exceptions can be turned on. | |||
The next steps are: | |||
* | * Remove all current OOM handling code | ||
* Rewrite call sites that ignore nsresults | |||
* Rewrite call sites that use NS_SUCCEEDED | |||
These steps are explained in more detail below. And by the way, we'd love to have community help with any of these. | |||
= Foo = | |||
== Benefits of Exceptions == | == Benefits of Exceptions == |
edits