File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 8
8
#include " env-inl.h"
9
9
#include " v8.h"
10
10
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>
12
14
13
15
namespace node {
14
16
@@ -70,10 +72,10 @@ namespace node {
70
72
// Errors with predefined non-static messages
71
73
inline void THROW_ERR_SCRIPT_EXECUTION_TIMEOUT (Environment* env,
72
74
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 () );
77
79
}
78
80
79
81
inline v8::Local<v8::Value> ERR_BUFFER_TOO_LARGE (v8::Isolate *isolate) {
You can’t perform that action at this time.
0 commit comments