I've seen quite a few instances of these idioms:
1)
if (ec)
    throwError(ec);


2)

if (ec)
    throwError(ec);
return v8::Undefined()

It's not obvious from the documentation, but throwError() always returns
v8::Undefined(), and it does nothing if ec == 0. So the code above could be
rewritten as:

1)
throwError(ec);


2)
return throwError(ec);

Something to keep in mind/clean up as people work on the bindings - there's
already a bunch of boilerplate idioms in the binding so every little bit
helps :)

-atw

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

Reply via email to