| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 02f7e3a commit 88cd4cf
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,8 +33,8 @@ static void sanity_check(void) { | |||
| 33 | 33 | assert(at_exit_cb2_called == 2); | |
| 34 | 34 | } | |
| 35 | 35 | ||
| 36 | - void init(Local<Object> target) { | ||
| 37 | - AtExit(at_exit_cb1, target->CreationContext()->GetIsolate()); | ||
| 36 | + void init(Local<Object> exports) { | ||
| 37 | + AtExit(at_exit_cb1, exports->GetIsolate()); | ||
| 38 | 38 | AtExit(at_exit_cb2, cookie); | |
| 39 | 39 | AtExit(at_exit_cb2, cookie); | |
| 40 | 40 | atexit(sanity_check); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,9 +36,9 @@ void Check(const v8::FunctionCallbackInfo<v8::Value>& args) { | |||
| 36 | 36 | assert(alive > 0); | |
| 37 | 37 | } | |
| 38 | 38 | ||
| 39 | - void init(v8::Local<v8::Object> target) { | ||
| 40 | - NODE_SET_METHOD(target, "alloc", Alloc); | ||
| 41 | - NODE_SET_METHOD(target, "check", Check); | ||
| 39 | + void init(v8::Local<v8::Object> exports) { | ||
| 40 | + NODE_SET_METHOD(exports, "alloc", Alloc); | ||
| 41 | + NODE_SET_METHOD(exports, "check", Check); | ||
| 42 | 42 | } | |
| 43 | 43 | ||
| 44 | 44 | NODE_MODULE(binding, init); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,8 +7,8 @@ void Method(const v8::FunctionCallbackInfo<v8::Value>& args) { | |||
| 7 | 7 | args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); | |
| 8 | 8 | } | |
| 9 | 9 | ||
| 10 | - void init(v8::Local<v8::Object> target) { | ||
| 11 | - NODE_SET_METHOD(target, "hello", Method); | ||
| 10 | + void init(v8::Local<v8::Object> exports) { | ||
| 11 | + NODE_SET_METHOD(exports, "hello", Method); | ||
| 12 | 12 | } | |
| 13 | 13 | ||
| 14 | 14 | NODE_MODULE(binding, init); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,8 +6,8 @@ void Method(const v8::FunctionCallbackInfo<v8::Value>& args) { | |||
| 6 | 6 | args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); | |
| 7 | 7 | } | |
| 8 | 8 | ||
| 9 | - void init(v8::Local<v8::Object> target) { | ||
| 10 | - NODE_SET_METHOD(target, "hello", Method); | ||
| 9 | + void init(v8::Local<v8::Object> exports) { | ||
| 10 | + NODE_SET_METHOD(exports, "hello", Method); | ||
| 11 | 11 | } | |
| 12 | 12 | ||
| 13 | 13 | NODE_MODULE(binding, init); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,8 +22,8 @@ void MakeCallback(const FunctionCallbackInfo<Value>& args) { | |||
| 22 | 22 | node::MakeCallback(isolate, recv, method, 0, nullptr); | |
| 23 | 23 | } | |
| 24 | 24 | ||
| 25 | - void Initialize(Local<Object> target) { | ||
| 26 | - NODE_SET_METHOD(target, "makeCallback", MakeCallback); | ||
| 25 | + void Initialize(Local<Object> exports) { | ||
| 26 | + NODE_SET_METHOD(exports, "makeCallback", MakeCallback); | ||
| 27 | 27 | } | |
| 28 | 28 | ||
| 29 | 29 | } // namespace | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,8 +30,8 @@ void MakeCallback(const v8::FunctionCallbackInfo<v8::Value>& args) { | |||
| 30 | 30 | args.GetReturnValue().Set(result); | |
| 31 | 31 | } | |
| 32 | 32 | ||
| 33 | - void Initialize(v8::Local<v8::Object> target) { | ||
| 34 | - NODE_SET_METHOD(target, "makeCallback", MakeCallback); | ||
| 33 | + void Initialize(v8::Local<v8::Object> exports) { | ||
| 34 | + NODE_SET_METHOD(exports, "makeCallback", MakeCallback); | ||
| 35 | 35 | } | |
| 36 | 36 | ||
| 37 | 37 | } // namespace | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,8 +34,8 @@ void Run(const v8::FunctionCallbackInfo<v8::Value>& args) { | |||
| 34 | 34 | assert(alive == 0); | |
| 35 | 35 | } | |
| 36 | 36 | ||
| 37 | - void init(v8::Local<v8::Object> target) { | ||
| 38 | - NODE_SET_METHOD(target, "run", Run); | ||
| 37 | + void init(v8::Local<v8::Object> exports) { | ||
| 38 | + NODE_SET_METHOD(exports, "run", Run); | ||
| 39 | 39 | } | |
| 40 | 40 | ||
| 41 | 41 | NODE_MODULE(binding, init); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,8 +29,8 @@ void ParseEncoding(const v8::FunctionCallbackInfo<v8::Value>& args) { | |||
| 29 | 29 | args.GetReturnValue().Set(encoding_string); | |
| 30 | 30 | } | |
| 31 | 31 | ||
| 32 | - void Initialize(v8::Local<v8::Object> target) { | ||
| 33 | - NODE_SET_METHOD(target, "parseEncoding", ParseEncoding); | ||
| 32 | + void Initialize(v8::Local<v8::Object> exports) { | ||
| 33 | + NODE_SET_METHOD(exports, "parseEncoding", ParseEncoding); | ||
| 34 | 34 | } | |
| 35 | 35 | ||
| 36 | 36 | } // anonymous namespace | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,8 +19,8 @@ void Method(const FunctionCallbackInfo<Value>& args) { | |||
| 19 | 19 | NULL); | |
| 20 | 20 | } | |
| 21 | 21 | ||
| 22 | - void init(Local<Object> target) { | ||
| 23 | - NODE_SET_METHOD(target, "method", Method); | ||
| 22 | + void init(Local<Object> exports) { | ||
| 23 | + NODE_SET_METHOD(exports, "method", Method); | ||
| 24 | 24 | } | |
| 25 | 25 | ||
| 26 | 26 | NODE_MODULE(binding, init); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,8 +17,8 @@ void EnsureAllocation(const v8::FunctionCallbackInfo<v8::Value> &args) { | |||
| 17 | 17 | args.GetReturnValue().Set(success); | |
| 18 | 18 | } | |
| 19 | 19 | ||
| 20 | - void init(v8::Local<v8::Object> target) { | ||
| 21 | - NODE_SET_METHOD(target, "ensureAllocation", EnsureAllocation); | ||
| 20 | + void init(v8::Local<v8::Object> exports) { | ||
| 21 | + NODE_SET_METHOD(exports, "ensureAllocation", EnsureAllocation); | ||
| 22 | 22 | } | |
| 23 | 23 | ||
| 24 | 24 | NODE_MODULE(binding, init); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments