1
0
Fork 0
This commit is contained in:
Jan Steemann 2013-03-19 11:32:27 +01:00
parent a0bf485e11
commit 54d05e35e6
1 changed files with 5 additions and 4 deletions

View File

@ -227,10 +227,11 @@ static v8::Handle<v8::Array> PathList (string const& modules) {
vector<string> paths = StringUtils::split(modules, ";:");
#endif
v8::Handle<v8::Array> result = v8::Array::New();
const uint32_t n = (uint32_t) paths.size();
v8::Handle<v8::Array> result = v8::Array::New(n);
for (uint32_t i = 0; i < (uint32_t) paths.size(); ++i) {
result->Set(i, v8::String::New(paths[i].c_str()));
for (uint32_t i = 0; i < n; ++i) {
result->Set(i, v8::String::New(paths[i].c_str(), paths[i].size()));
}
return scope.Close(result);