Bug 40565 - [WebKitSite] Improve assertion macro documentation
Summary: [WebKitSite] Improve assertion macro documentation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-14 05:15 PDT by Jeremy Moskovich
Modified: 2010-06-16 22:08 PDT (History)
4 users (show)

See Also:


Attachments
Improve assertion documentation (2.44 KB, patch)
2010-06-14 05:18 PDT, Jeremy Moskovich
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Moskovich 2010-06-14 05:15:23 PDT
Address review comments (https://bugs.webkit.org/show_bug.cgi?id=39950#c7) and improve assertion macro documentation.
Comment 1 Jeremy Moskovich 2010-06-14 05:18:12 PDT
Created attachment 58637 [details]
Improve assertion documentation
Comment 2 Darin Adler 2010-06-14 10:47:38 PDT
Comment on attachment 58637 [details]
Improve assertion documentation

These changes look good.

I think that it’s overstating the case to say that out of memory errors are not recoverable. Maybe there’s a more nuanced way to talk about this. Because of virtual memory systems we program assuming we will not run out of memory for small allocation, and we don't wish to rewrite all the code to handle out-of-memory errors. In those cases we want to terminate the program if we can’t get the memory. But we do have functions that return 0 if there is not sufficient memory. We tend to use those for larger allocations that might fail in practice even if the program has ample space to continue.

The topic is generally subtle and just stating that memory errors are unrecoverable is imprecise.
Comment 3 WebKit Commit Bot 2010-06-16 22:08:03 PDT
Comment on attachment 58637 [details]
Improve assertion documentation

Clearing flags on attachment: 58637

Committed r61305: <http://trac.webkit.org/changeset/61305>
Comment 4 WebKit Commit Bot 2010-06-16 22:08:08 PDT
All reviewed patches have been landed.  Closing bug.