Remove unneeded HandleScopes.
It's not necessary to create HandleScope in v8 native binding functions, because it's guarrenteed that the there is a upper HandleScope when the native function is called. So unless we are urgent to free the handles, not using HandleScope in native binding functions is a cleaner and safer choice.
This commit is contained in:
parent
426bc97194
commit
5250871e69
14 changed files with 0 additions and 40 deletions
|
@ -74,8 +74,6 @@ void MenuMac::SendActionToFirstResponder(const std::string& action) {
|
|||
|
||||
// static
|
||||
void Menu::SetApplicationMenu(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
v8::HandleScope handle_scope(args.GetIsolate());
|
||||
|
||||
if (!args[0]->IsObject())
|
||||
return node::ThrowTypeError("Bad argument");
|
||||
|
||||
|
@ -94,8 +92,6 @@ void Menu::SetApplicationMenu(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
|||
// static
|
||||
void Menu::SendActionToFirstResponder(
|
||||
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
v8::HandleScope handle_scope(args.GetIsolate());
|
||||
|
||||
std::string action;
|
||||
if (!FromV8Arguments(args, &action))
|
||||
return node::ThrowTypeError("Bad argument");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue