Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2014-04-10 04:33:33 +0400
committerTimothy J Fontaine <tjfontaine@gmail.com>2014-06-07 02:07:29 +0400
commit535c7777ac674ba86cf93c44824e07b0e23ea8c4 (patch)
tree3a4ffb376febdee64f8c7567d6e60aede3120901 /src/node_dtrace.cc
parent0da4c671659cfbae12def127b2e94690b9d9b5e1 (diff)
src: replace usage of String::Utf8Value
v8::String::Utf8Value previously could allow invalid surrogates when interpreting values.
Diffstat (limited to 'src/node_dtrace.cc')
-rw-r--r--src/node_dtrace.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc
index 4b851e38fed..0b2d0f482b5 100644
--- a/src/node_dtrace.cc
+++ b/src/node_dtrace.cc
@@ -20,6 +20,8 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
+#include "util.h"
+
#ifdef HAVE_DTRACE
#include "node_dtrace.h"
#include <string.h>
@@ -66,7 +68,7 @@ using namespace v8;
return (ThrowException(Exception::Error(String::New("expected " \
"object for " #obj " to contain string member " #member)))); \
} \
- String::Utf8Value _##member(obj->Get(String::New(#member))); \
+ node::Utf8Value _##member(obj->Get(String::New(#member))); \
if ((*(const char **)valp = *_##member) == NULL) \
*(const char **)valp = "<unknown>";
@@ -241,7 +243,7 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) {
"object for request to contain string member headers"))));
Local<Value> strfwdfor = headers->Get(String::New("x-forwarded-for"));
- String::Utf8Value fwdfor(strfwdfor);
+ node::Utf8Value fwdfor(strfwdfor);
if (!strfwdfor->IsString() || (req.forwardedFor = *fwdfor) == NULL)
req.forwardedFor = const_cast<char*>("");