Firebase Update
This commit is contained in:
36
express-server/node_modules/nan/nan.h
generated
vendored
36
express-server/node_modules/nan/nan.h
generated
vendored
@ -13,7 +13,7 @@
|
||||
*
|
||||
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
|
||||
*
|
||||
* Version 2.12.0: current Node 11.4.0, Node 12: 0.12.18, Node 10: 0.10.48, iojs: 3.3.1
|
||||
* Version 2.11.1: current Node 10.11.0, Node 12: 0.12.18, Node 10: 0.10.48, iojs: 3.3.1
|
||||
*
|
||||
* See https://github.com/nodejs/nan for the latest update to this file
|
||||
**********************************************************************************/
|
||||
@ -37,7 +37,6 @@
|
||||
#define NODE_8_0_MODULE_VERSION 57
|
||||
#define NODE_9_0_MODULE_VERSION 59
|
||||
#define NODE_10_0_MODULE_VERSION 64
|
||||
#define NODE_11_0_MODULE_VERSION 67
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800)
|
||||
@ -1061,10 +1060,8 @@ class Utf8String {
|
||||
length_(0), str_(str_st_) {
|
||||
HandleScope scope;
|
||||
if (!from.IsEmpty()) {
|
||||
#if NODE_MAJOR_VERSION >= 10
|
||||
v8::Local<v8::Context> context = GetCurrentContext();
|
||||
v8::Local<v8::String> string =
|
||||
from->ToString(context).FromMaybe(v8::Local<v8::String>());
|
||||
#if V8_MAJOR_VERSION >= 7
|
||||
v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
|
||||
#else
|
||||
v8::Local<v8::String> string = from->ToString();
|
||||
#endif
|
||||
@ -1077,7 +1074,7 @@ class Utf8String {
|
||||
}
|
||||
const int flags =
|
||||
v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8;
|
||||
#if NODE_MAJOR_VERSION >= 10
|
||||
#if V8_MAJOR_VERSION >= 7
|
||||
length_ = string->WriteUtf8(v8::Isolate::GetCurrent(), str_, static_cast<int>(len), 0, flags);
|
||||
#else
|
||||
length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
|
||||
@ -1661,9 +1658,9 @@ class Callback {
|
||||
v8::EscapableHandleScope scope(isolate);
|
||||
# if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
|
||||
AsyncResource async("nan:Callback:Call");
|
||||
return scope.Escape(Call_(isolate, isolate->GetCurrentContext()->Global(),
|
||||
argc, argv, &async)
|
||||
.FromMaybe(v8::Local<v8::Value>()));
|
||||
return Call_(isolate, isolate->GetCurrentContext()->Global(), argc, argv,
|
||||
&async)
|
||||
.FromMaybe(v8::Local<v8::Value>());
|
||||
# else
|
||||
return scope.Escape(
|
||||
Call_(isolate, isolate->GetCurrentContext()->Global(), argc, argv));
|
||||
@ -1855,41 +1852,36 @@ inline MaybeLocal<v8::Value> Call(
|
||||
inline void SaveToPersistent(
|
||||
const char *key, const v8::Local<v8::Value> &value) {
|
||||
HandleScope scope;
|
||||
Set(New(persistentHandle), New(key).ToLocalChecked(), value).FromJust();
|
||||
New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
|
||||
}
|
||||
|
||||
inline void SaveToPersistent(
|
||||
const v8::Local<v8::String> &key, const v8::Local<v8::Value> &value) {
|
||||
HandleScope scope;
|
||||
Set(New(persistentHandle), key, value).FromJust();
|
||||
New(persistentHandle)->Set(key, value);
|
||||
}
|
||||
|
||||
inline void SaveToPersistent(
|
||||
uint32_t index, const v8::Local<v8::Value> &value) {
|
||||
HandleScope scope;
|
||||
Set(New(persistentHandle), index, value).FromJust();
|
||||
New(persistentHandle)->Set(index, value);
|
||||
}
|
||||
|
||||
inline v8::Local<v8::Value> GetFromPersistent(const char *key) const {
|
||||
EscapableHandleScope scope;
|
||||
return scope.Escape(
|
||||
Get(New(persistentHandle), New(key).ToLocalChecked())
|
||||
.FromMaybe(v8::Local<v8::Value>()));
|
||||
New(persistentHandle)->Get(New(key).ToLocalChecked()));
|
||||
}
|
||||
|
||||
inline v8::Local<v8::Value>
|
||||
GetFromPersistent(const v8::Local<v8::String> &key) const {
|
||||
EscapableHandleScope scope;
|
||||
return scope.Escape(
|
||||
Get(New(persistentHandle), key)
|
||||
.FromMaybe(v8::Local<v8::Value>()));
|
||||
return scope.Escape(New(persistentHandle)->Get(key));
|
||||
}
|
||||
|
||||
inline v8::Local<v8::Value> GetFromPersistent(uint32_t index) const {
|
||||
EscapableHandleScope scope;
|
||||
return scope.Escape(
|
||||
Get(New(persistentHandle), index)
|
||||
.FromMaybe(v8::Local<v8::Value>()));
|
||||
return scope.Escape(New(persistentHandle)->Get(index));
|
||||
}
|
||||
|
||||
virtual void Execute() = 0;
|
||||
@ -2383,7 +2375,7 @@ SetMethodAux(T recv,
|
||||
v8::Local<v8::String> name,
|
||||
v8::Local<v8::FunctionTemplate> tpl,
|
||||
...) {
|
||||
Set(recv, name, GetFunction(tpl).ToLocalChecked());
|
||||
recv->Set(name, GetFunction(tpl).ToLocalChecked());
|
||||
}
|
||||
|
||||
} // end of namespace imp
|
||||
|
Reference in New Issue
Block a user