Remove calls to v8::Isolate::GetCurrent

It is generally a bad thing to do since we might have multiple Isolates.
This commit is contained in:
Cheng Zhao 2015-06-23 17:22:14 +08:00
parent 1f97cee7c9
commit 197a9b4165
7 changed files with 38 additions and 46 deletions

View file

@ -55,11 +55,10 @@ bool Menu::IsCommandIdVisible(int command_id) const {
bool Menu::GetAcceleratorForCommandId(int command_id,
ui::Accelerator* accelerator) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
v8::Local<v8::Value> val = get_accelerator_.Run(command_id);
return mate::ConvertFromV8(isolate, val, accelerator);
return mate::ConvertFromV8(isolate(), val, accelerator);
}
void Menu::ExecuteCommand(int command_id, int event_flags) {