What about NewRunnableFunction() in task.h? Slightly overkill because
of heap usage and parameter copy but it is quite strict.

It also requires writing the call in a different and less obvious way,
which may counter the benefit.

M-A

On Fri, May 1, 2009 at 4:39 PM, Adam Langley <a...@chromium.org> wrote:
>
> On Fri, May 1, 2009 at 1:32 PM, Adam Barth <aba...@chromium.org> wrote:
>> There's also a problem if you write something like:
>>
>> HANDLE_EINTR(close(PromptUserForFileDescriptor()));
>>
>> Macros suck.
>>
>> What about something like base::close that's inline and knows how to loop?
>
> Yea, the macro will trigger multiple evaluation of the arguments.
> Having inspected every case in base/, net/ and chrome/, it's not
> currently a problem. Hopefully the ALL_CAPS name will alert people to
> the possibility.
>
> The alternative is to implement a wrapper for every system call which
> needs wrapping. I don't much like that, but I'm willing to do it if
> the balance of option favours it.
>
>
> AGL
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to