mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Use new context aware module API in builtin modules.
This commit is contained in:
@@ -69,9 +69,10 @@ void Tray::BuildPrototype(v8::Isolate* isolate,
|
||||
|
||||
namespace {
|
||||
|
||||
void Initialize(v8::Handle<v8::Object> exports) {
|
||||
void Initialize(v8::Handle<v8::Object> exports, v8::Handle<v8::Value> unused,
|
||||
v8::Handle<v8::Context> context, void* priv) {
|
||||
using atom::api::Tray;
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
v8::Handle<v8::Function> constructor = mate::CreateConstructor<Tray>(
|
||||
isolate, "Tray", base::Bind(&Tray::New));
|
||||
mate::Dictionary dict(isolate, exports);
|
||||
@@ -80,4 +81,4 @@ void Initialize(v8::Handle<v8::Object> exports) {
|
||||
|
||||
} // namespace
|
||||
|
||||
NODE_MODULE_X(atom_browser_tray, Initialize, NULL, NM_F_BUILTIN)
|
||||
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_tray, Initialize)
|
||||
|
||||
Reference in New Issue
Block a user