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
|
@ -20,7 +20,7 @@ namespace api {
|
|||
class Menu : public mate::TrackableObject<Menu>,
|
||||
public AtomMenuModel::Delegate {
|
||||
public:
|
||||
static mate::WrappableBase* Create(v8::Isolate* isolate);
|
||||
static mate::WrappableBase* New(mate::Arguments* args);
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::ObjectTemplate> prototype);
|
||||
|
@ -36,7 +36,7 @@ class Menu : public mate::TrackableObject<Menu>,
|
|||
AtomMenuModel* model() const { return model_.get(); }
|
||||
|
||||
protected:
|
||||
explicit Menu(v8::Isolate* isolate);
|
||||
Menu(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
|
||||
~Menu() override;
|
||||
|
||||
// mate::Wrappable:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue