diff options
author | isaacs <i@izs.me> | 2012-09-18 15:20:38 -0700 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-09-21 01:52:24 +0200 |
commit | 3411a03dd114d635800cc50749d2351cd734eb2a (patch) | |
tree | 0ba1e52ab2236286894b33400302181ece91b63a /deps/v8/samples/process.cc | |
parent | cc1b09d6b7c3cc6b8729804cbf644634ba5d0815 (diff) | |
download | android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.tar.gz android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.tar.bz2 android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.zip |
V8: Upgrade to 3.13.7.1
Diffstat (limited to 'deps/v8/samples/process.cc')
-rw-r--r-- | deps/v8/samples/process.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/deps/v8/samples/process.cc b/deps/v8/samples/process.cc index c0cee4c28e..ae6a5500cd 100644 --- a/deps/v8/samples/process.cc +++ b/deps/v8/samples/process.cc @@ -1,4 +1,4 @@ -// Copyright 2008 the V8 project authors. All rights reserved. +// Copyright 2012 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -351,7 +351,7 @@ Handle<Value> JsHttpRequestProcessor::MapGet(Local<String> name, // Otherwise fetch the value and wrap it in a JavaScript string const string& value = (*iter).second; - return String::New(value.c_str(), value.length()); + return String::New(value.c_str(), static_cast<int>(value.length())); } @@ -443,7 +443,7 @@ Handle<Value> JsHttpRequestProcessor::GetPath(Local<String> name, const string& path = request->Path(); // Wrap the result in a JavaScript string and return it. - return String::New(path.c_str(), path.length()); + return String::New(path.c_str(), static_cast<int>(path.length())); } @@ -451,7 +451,7 @@ Handle<Value> JsHttpRequestProcessor::GetReferrer(Local<String> name, const AccessorInfo& info) { HttpRequest* request = UnwrapRequest(info.Holder()); const string& path = request->Referrer(); - return String::New(path.c_str(), path.length()); + return String::New(path.c_str(), static_cast<int>(path.length())); } @@ -459,7 +459,7 @@ Handle<Value> JsHttpRequestProcessor::GetHost(Local<String> name, const AccessorInfo& info) { HttpRequest* request = UnwrapRequest(info.Holder()); const string& path = request->Host(); - return String::New(path.c_str(), path.length()); + return String::New(path.c_str(), static_cast<int>(path.length())); } @@ -467,7 +467,7 @@ Handle<Value> JsHttpRequestProcessor::GetUserAgent(Local<String> name, const AccessorInfo& info) { HttpRequest* request = UnwrapRequest(info.Holder()); const string& path = request->UserAgent(); - return String::New(path.c_str(), path.length()); + return String::New(path.c_str(), static_cast<int>(path.length())); } @@ -557,7 +557,7 @@ Handle<String> ReadFile(const string& name) { char* chars = new char[size + 1]; chars[size] = '\0'; for (int i = 0; i < size;) { - int read = fread(&chars[i], 1, size - i, file); + int read = static_cast<int>(fread(&chars[i], 1, size - i, file)); i += read; } fclose(file); |