Christian Holler recently started fixing OOM bugs for us. He says it's
easier than creating reproducible test cases. A happy outcome for
everyone! :)

But looking over the patches, I'm surprised to see us getting basic OOM
handling wrong so often. Take a look, and make sure you know the rules:

    Error returns must be distinguishable from success returns that
    produce false as a result value.
    https://bug948023.bugzilla.mozilla.org/attachment.cgi?id=8344767

    If a function is fallible, its callers need to be fallible.
    https://bug937083.bugzilla.mozilla.org/attachment.cgi?id=8343816

    `nullptr->as<T>()` doesn't work.
    https://bug948188.bugzilla.mozilla.org/attachment.cgi?id=8344973

Of course sometimes there's just a typo, and nothing but an eagle-eyed
review (or static analysis) could have caught it:

    https://bug948233.bugzilla.mozilla.org/attachment.cgi?id=8345050

(As Christian pointed out to me, static analysis could find some of
these, but not all.)

-j

_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to