File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 88#include " env-inl.h"
99#include " v8.h"
1010
11- #include < inttypes.h>
11+ // Use ostringstream to print exact-width integer types
12+ // because the format specifiers are not available on AIX.
13+ #include < sstream>
1214
1315namespace node {
1416
@@ -70,10 +72,10 @@ namespace node {
7072// Errors with predefined non-static messages
7173inline void THROW_ERR_SCRIPT_EXECUTION_TIMEOUT (Environment* env,
7274 int64_t timeout) {
73- char message[ 128 ] ;
74- snprintf ( message, sizeof (message),
75- " Script execution timed out after % " PRId64 " ms" , timeout) ;
76- THROW_ERR_SCRIPT_EXECUTION_TIMEOUT (env, message);
75+ std::ostringstream message;
76+ message << " Script execution timed out after " ;
77+ message << timeout << " ms" ;
78+ THROW_ERR_SCRIPT_EXECUTION_TIMEOUT (env, message. str (). c_str () );
7779}
7880
7981inline v8::Local<v8::Value> ERR_BUFFER_TOO_LARGE (v8::Isolate *isolate) {
You can’t perform that action at this time.
0 commit comments