Calling delegate methods should pass command id of menu item.

This commit is contained in:
Cheng Zhao 2013-05-16 15:32:37 +08:00
parent b16c19ce32
commit 5d985aae09

View file

@ -45,8 +45,10 @@ v8::Handle<v8::Value> CallDelegate(v8::Handle<v8::Value> default_value,
if (!function->IsFunction())
return default_value;
v8::Handle<v8::Value> argv = v8::Integer::New(command_id);
return scope.Close(
function->Call(v8::Context::GetCurrent()->Global(), 0, NULL));
function->Call(v8::Context::GetCurrent()->Global(), 1, &argv));
}
} // namespace