mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-15 08:21:12 +00:00
.
This commit is contained in:
parent
78d7c382fb
commit
e7ed525da5
7117 changed files with 1773720 additions and 211 deletions
29
node_modules/nan/nan_define_own_property_helper.h
generated
vendored
Normal file
29
node_modules/nan/nan_define_own_property_helper.h
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*********************************************************************
|
||||
* NAN - Native Abstractions for Node.js
|
||||
*
|
||||
* Copyright (c) 2018 NAN contributors
|
||||
*
|
||||
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
|
||||
********************************************************************/
|
||||
|
||||
#ifndef NAN_DEFINE_OWN_PROPERTY_HELPER_H_
|
||||
#define NAN_DEFINE_OWN_PROPERTY_HELPER_H_
|
||||
|
||||
namespace imp {
|
||||
|
||||
inline Maybe<bool> DefineOwnPropertyHelper(
|
||||
v8::PropertyAttribute current
|
||||
, v8::Handle<v8::Object> obj
|
||||
, v8::Handle<v8::String> key
|
||||
, v8::Handle<v8::Value> value
|
||||
, v8::PropertyAttribute attribs = v8::None) {
|
||||
return !(current & v8::DontDelete) || // configurable OR
|
||||
(!(current & v8::ReadOnly) && // writable AND
|
||||
!((attribs ^ current) & ~v8::ReadOnly)) // same excluding RO
|
||||
? Just<bool>(obj->ForceSet(key, value, attribs))
|
||||
: Nothing<bool>();
|
||||
}
|
||||
|
||||
} // end of namespace imp
|
||||
|
||||
#endif // NAN_DEFINE_OWN_PROPERTY_HELPER_H_
|
Loading…
Add table
Add a link
Reference in a new issue