File tree 4 files changed +493
-170
lines changed
4 files changed +493
-170
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ node_js:
10
10
- 6
11
11
- 8
12
12
- 10
13
+ - 12
13
14
14
15
env :
15
16
global :
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ environment:
5
5
- nodejs_version : " 6"
6
6
- nodejs_version : " 8"
7
7
- nodejs_version : " 10"
8
+ - nodejs_version : " 12"
8
9
9
10
branches :
10
11
only :
Original file line number Diff line number Diff line change @@ -126,8 +126,9 @@ NAN_MODULE_INIT(NSFW::Init) {
126
126
SetPrototypeMethod (tpl, " start" , Start);
127
127
SetPrototypeMethod (tpl, " stop" , Stop);
128
128
129
- constructor.Reset (tpl->GetFunction ());
130
- Set (target, New<v8::String>(" NSFW" ).ToLocalChecked (), tpl->GetFunction ());
129
+ v8::Local<v8::Context> context = Nan::GetCurrentContext ();
130
+ constructor.Reset (tpl->GetFunction (context).ToLocalChecked ());
131
+ Set (target, New<v8::String>(" NSFW" ).ToLocalChecked (), tpl->GetFunction (context).ToLocalChecked ());
131
132
}
132
133
133
134
NAN_METHOD (NSFW::JSNew) {
@@ -154,8 +155,9 @@ NAN_METHOD(NSFW::JSNew) {
154
155
return ThrowError (" Fourth argument of constructor must be a callback." );
155
156
}
156
157
157
- uint32_t debounceMS = info[0 ]->Uint32Value ();
158
- v8::String::Utf8Value utf8Value (info[1 ]->ToString ());
158
+ v8::Local<v8::Context> context = Nan::GetCurrentContext ();
159
+ uint32_t debounceMS = info[0 ]->Uint32Value (context).FromJust ();
160
+ Nan::Utf8String utf8Value (Nan::To<v8::String>(info[1 ]).ToLocalChecked ());
159
161
std::string path = std::string (*utf8Value);
160
162
Callback *eventCallback = new Callback (info[2 ].As <v8::Function>());
161
163
Callback *errorCallback = new Callback (info[3 ].As <v8::Function>());
You can’t perform that action at this time.
0 commit comments