1 |
|
2 |
|
3 |
|
4 | // v8 deprecated Isolate::SetData and GetData at
|
5 | // version 3.23.11 and removed them at version 3.24.4,
|
6 | // but NODE_MODULE_VERSION will not change after until
|
7 | // next stable release.
|
8 |
|
9 | NAN_INLINE void NanSetIsolateData(
|
10 | v8::Isolate *isolate
|
11 | , void *data
|
12 | ) {
|
13 |
|
14 | isolate->SetData(0, data);
|
15 |
|
16 | isolate->SetData(data);
|
17 |
|
18 | }
|
19 |
|
20 | NAN_INLINE void *NanGetIsolateData(
|
21 | v8::Isolate *isolate
|
22 | ) {
|
23 |
|
24 | return isolate->GetData(0);
|
25 |
|
26 | return isolate->GetData();
|
27 |
|
28 | }
|
29 |
|
30 |
|