git.schokokeks.org
Repositories
Help
Report an Issue
wirc-backend.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
c972b0c
Branches
Tags
master
wirc-backend.git
lib
node
node_modules
nan
nan_scriptorigin.h
[ini]
Christian Fraß
commited
c972b0c
at 2021-11-18 23:53:54
nan_scriptorigin.h
Blame
History
Raw
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2021 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_SCRIPTORIGIN_H_ #define NAN_SCRIPTORIGIN_H_ class ScriptOrigin : public v8::ScriptOrigin { public: #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \ (V8_MAJOR_VERSION == 9 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 0\ || (V8_MINOR_VERSION == 0 && defined(V8_BUILD_NUMBER) \ && V8_BUILD_NUMBER >= 1))))) explicit ScriptOrigin(v8::Local<v8::Value> name) : v8::ScriptOrigin(v8::Isolate::GetCurrent(), name) {} ScriptOrigin(v8::Local<v8::Value> name , v8::Local<v8::Integer> line) : v8::ScriptOrigin(v8::Isolate::GetCurrent() , name , To<int32_t>(line).FromMaybe(0)) {} ScriptOrigin(v8::Local<v8::Value> name , v8::Local<v8::Integer> line , v8::Local<v8::Integer> column) : v8::ScriptOrigin(v8::Isolate::GetCurrent() , name , To<int32_t>(line).FromMaybe(0) , To<int32_t>(column).FromMaybe(0)) {} #elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 8 || \ (V8_MAJOR_VERSION == 8 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 9\ || (V8_MINOR_VERSION == 9 && defined(V8_BUILD_NUMBER) \ && V8_BUILD_NUMBER >= 45))))) explicit ScriptOrigin(v8::Local<v8::Value> name) : v8::ScriptOrigin(name) {} ScriptOrigin(v8::Local<v8::Value> name , v8::Local<v8::Integer> line) : v8::ScriptOrigin(name, To<int32_t>(line).FromMaybe(0)) {} ScriptOrigin(v8::Local<v8::Value> name , v8::Local<v8::Integer> line , v8::Local<v8::Integer> column) : v8::ScriptOrigin(name , To<int32_t>(line).FromMaybe(0) , To<int32_t>(column).FromMaybe(0)) {} #else explicit ScriptOrigin(v8::Local<v8::Value> name) : v8::ScriptOrigin(name) {} ScriptOrigin(v8::Local<v8::Value> name , v8::Local<v8::Integer> line) : v8::ScriptOrigin(name, line) {} ScriptOrigin(v8::Local<v8::Value> name , v8::Local<v8::Integer> line , v8::Local<v8::Integer> column) : v8::ScriptOrigin(name, line, column) {} #endif #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 8 || \ (V8_MAJOR_VERSION == 8 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 9\ || (V8_MINOR_VERSION == 9 && defined(V8_BUILD_NUMBER) \ && V8_BUILD_NUMBER >= 45))))) v8::Local<v8::Integer> ResourceLineOffset() const { return New(LineOffset()); } v8::Local<v8::Integer> ResourceColumnOffset() const { return New(ColumnOffset()); } #endif }; #endif // NAN_SCRIPTORIGIN_H_