Calling delegate methods should pass command id of menu item.
This commit is contained in:
parent
b16c19ce32
commit
5d985aae09
1 changed files with 3 additions and 1 deletions
|
@ -45,8 +45,10 @@ v8::Handle<v8::Value> CallDelegate(v8::Handle<v8::Value> default_value,
|
||||||
if (!function->IsFunction())
|
if (!function->IsFunction())
|
||||||
return default_value;
|
return default_value;
|
||||||
|
|
||||||
|
v8::Handle<v8::Value> argv = v8::Integer::New(command_id);
|
||||||
|
|
||||||
return scope.Close(
|
return scope.Close(
|
||||||
function->Call(v8::Context::GetCurrent()->Global(), 0, NULL));
|
function->Call(v8::Context::GetCurrent()->Global(), 1, &argv));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Add table
Reference in a new issue