Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: src/execution.cc

Issue 1940: Replaced calls to functions that msvc consider deprecated. Used... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/disassembler.cc ('k') | src/flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.cc
===================================================================
--- src/execution.cc (revision 280)
+++ src/execution.cc (working copy)
@@ -587,10 +587,10 @@
static const size_t kErrorPrefixLength = 25; // strlen is not constant
ASSERT(strlen(kErrorPrefix) == kErrorPrefixLength);
static const int kMaxErrorLength = kMaxPathLength + kErrorPrefixLength;
- char error_buffer[kMaxErrorLength + 1];
- OS::SNPrintF(error_buffer, kMaxErrorLength, "%s%s",
- kErrorPrefix, file_name_buffer);
- v8::Handle<v8::String> error = v8::String::New(error_buffer);
+ EmbeddedVector<char, kMaxErrorLength + 1> error_buffer;
+ OS::SNPrintF(error_buffer, "%s%s", kErrorPrefix, file_name_buffer);
+ v8::Handle<v8::String> error =
+ v8::String::New(error_buffer.start(), error_buffer.length());
v8::ThrowException(v8::Exception::Error(error));
return result;
}
« no previous file with comments | « src/disassembler.cc ('k') | src/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698