I'll address the feedback, add the GYP/GN magic and even (*drumroll*) add a
few
unit tests. Stay tuned...
https://codereview.chromium.org/352823003/diff/1/src/ostreams.cc
File src/ostreams.cc (right):
https://codereview.chromium.org/352823003/diff/1/src/ostreams.cc#newcode10
src/ostreams.cc:10: #define snprintf sprintf_s
On 2014/06/25 22:00:57, Michael Starzinger wrote:
Can we use SNPrintF from utils.h instead of using compiler-specific
#ifdef's
here?
I intentionally avoided OS::SNPrintF because we increase dependecies for
no good reason. I think that src/base might be an even better place for
ostreams.{cc,h}, so it's important to keep dependencies simple and don't
introduce any cycles.
One could even go as far as using _MSC_VER directly, nuke the few
V8_OVERRIDEs and expand the (trivial) DISALLOW_COPY_AND_ASSIGNs by hand
to get something totally v8-independent, which would be nice (and is
what I would have done personally). But I wanted to avoid lengthy
discussions... ;-)
https://codereview.chromium.org/352823003/diff/1/src/ostreams.h
File src/ostreams.h (right):
https://codereview.chromium.org/352823003/diff/1/src/ostreams.h#newcode101
src/ostreams.h:101: explicit OFStream(const char* p) : f_(fopen(p,
"w")), own_(true) { }
On 2014/06/25 14:48:16, Benedikt Meurer wrote:
Please remove this constructor. It performs absolutely no error
checking on the
result of fopen.
But this would be in line with ignoring basically all I/O errors in the
rest of v8... :-D More seriously: Removing it is fine with me, but then
I'll remove close(), too, leaving just a plain decorator for FILE*.
Another approach might be introducing the 'failbit', but let's keep
things simple for now and only add things when we really need it.
https://codereview.chromium.org/352823003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.