Re-apply commit e307468.

The V8 assert got triggered by a missing HandleScope::Close().
This commit is contained in:
Ben Noordhuis
2012-06-29 17:29:32 +02:00
parent 0581afe531
commit fee02db705
2 changed files with 13 additions and 3 deletions

View File

@@ -1959,8 +1959,8 @@ static Handle<Value> EnvGetter(Local<String> property,
return scope.Close(String::New(reinterpret_cast<uint16_t*>(buffer), result));
}
#endif
// Not found
return Undefined();
// Not found. Fetch from prototype.
return scope.Close(info.Data().As<Object>()->Get(property));
}
@@ -2210,7 +2210,7 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
EnvQuery,
EnvDeleter,
EnvEnumerator,
Undefined());
Object::New());
Local<Object> env = envTemplate->NewInstance();
process->Set(String::NewSymbol("env"), env);