use v8::Object::Get

This commit is contained in:
Robo 2016-02-25 11:21:21 +05:30
parent 467870deb6
commit a1a17b7ee8

View file

@ -240,8 +240,7 @@ base::Value* V8ValueConverter::FromV8ValueImpl(
if (val->IsDate()) { if (val->IsDate()) {
v8::Date* date = v8::Date::Cast(*val); v8::Date* date = v8::Date::Cast(*val);
v8::Local<v8::Value> toISOString = v8::Local<v8::Value> toISOString =
date->GetRealNamedPropertyInPrototypeChain( date->Get(v8::String::NewFromUtf8(isolate, "toISOString"));
v8::String::NewFromUtf8(isolate, "toISOString"));
if (toISOString->IsFunction()) { if (toISOString->IsFunction()) {
v8::Local<v8::Value> result = v8::Local<v8::Value> result =
toISOString.As<v8::Function>()->Call(val, 0, nullptr); toISOString.As<v8::Function>()->Call(val, 0, nullptr);