Mir

Code review comment for lp:~mir-team/mir/public-cookie-api

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

> +MirCookie const* mir_cookie_from_buffer(void const* buffer, size_t size)
> +{
> + if (size != mir::cookie::default_blob_size)
> + return NULL;
> +
> + return new MirCookie(buffer, size);
> +}
>
> While it is extremely unlikely for operator new() (or any of the other code
> currently invoked here) to throw I think we should trap exceptions and not
> allow them to propagate from a C API.

Fixed!

« Back to merge proposal