It currently calls FreeNotNull which seems wrong, unless the C++ compiler generates the NULL check?
IMO operator delete should not be resilient to NULL, because GC::Free is not allowed on a NULL pointer by long-standing tradition.
(In reply to comment #1) > IMO operator delete should not be resilient to NULL, because GC::Free is not > allowed on a NULL pointer by long-standing tradition. Actually that's a ludicrous claim. Anyway: I thought the delete operator would only be invoked on non-NULL pointers and I thought I checked that when I wrote the code. But I've not yet found prose in the C++ spec to back me up on that.
The compiler does not do a NULL check and the default delete operator handles NULL.
C++ operator delete explicitly allows NULL pointers, so any "delete" we offer should probably do so as well, to re-use brainprint.
Created attachment 508769 [details] [diff] [review] allow null arg to delete Ruchi needs this to complete her audit changes.
changeset: 5859:485ac738ec90 user: Tommy Reilly <firstname.lastname@example.org> summary: [Bug 629391] GC delete operator should be resilient to NULL (r=lhansen) http://hg.mozilla.org/tamarin-redux/rev/485ac738ec90