summaryrefslogtreecommitdiffstats
path: root/gin
diff options
context:
space:
mode:
Diffstat (limited to 'gin')
-rw-r--r--gin/converter.cc4
-rw-r--r--gin/initialize.cc3
2 files changed, 4 insertions, 3 deletions
diff --git a/gin/converter.cc b/gin/converter.cc
index 8f9d0ab..64f5954 100644
--- a/gin/converter.cc
+++ b/gin/converter.cc
@@ -89,7 +89,7 @@ Handle<Value> Converter<std::string>::ToV8(Isolate* isolate,
return String::NewFromUtf8(isolate,
val.data(),
String::kNormalString,
- val.length());
+ static_cast<uint32_t>(val.length()));
}
bool Converter<std::string>::FromV8(Handle<Value> val,
@@ -129,7 +129,7 @@ v8::Handle<v8::String> StringToSymbol(v8::Isolate* isolate,
return String::NewFromUtf8(isolate,
val.data(),
String::kInternalizedString,
- val.length());
+ static_cast<uint32_t>(val.length()));
}
diff --git a/gin/initialize.cc b/gin/initialize.cc
index 450ff2a..64b5908 100644
--- a/gin/initialize.cc
+++ b/gin/initialize.cc
@@ -26,7 +26,8 @@ const char kFlags[] = "--use_strict --harmony";
void Initialize() {
v8::V8::SetArrayBufferAllocator(ArrayBufferAllocator::SharedInstance());
v8::V8::InitializeICU();
- v8::V8::SetFlagsFromString(kFlags, strlen(kFlags));
+ v8::V8::SetFlagsFromString(kFlags,
+ static_cast<uint32_t>(sizeof(kFlags) / sizeof(kFlags[0])) - 1);
v8::V8::SetEntropySource(&GenerateEntropy);
v8::V8::Initialize();