Do not rely on Constructor to call Init
This makes it deterministic when the JavaScript is initialized, which can make our logic more clear.
This commit is contained in:
parent
84bb82866d
commit
1505a46ed0
11 changed files with 44 additions and 44 deletions
|
@ -14,7 +14,8 @@ namespace atom {
|
|||
|
||||
namespace api {
|
||||
|
||||
MenuViews::MenuViews(v8::Isolate* isolate) : Menu(isolate) {
|
||||
MenuViews::MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
|
||||
: Menu(isolate, wrapper) {
|
||||
}
|
||||
|
||||
void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) {
|
||||
|
@ -53,8 +54,8 @@ void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) {
|
|||
}
|
||||
|
||||
// static
|
||||
mate::WrappableBase* Menu::Create(v8::Isolate* isolate) {
|
||||
return new MenuViews(isolate);
|
||||
mate::WrappableBase* Menu::New(mate::Arguments* args) {
|
||||
return new MenuViews(args->isolate(), args->GetThis());
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue