mirror of https://gitee.com/bigwinds/arangodb
isEnterprise must also be defined during database upgrade
move it to a more central location
This commit is contained in:
parent
c3de3ca792
commit
6d2d5ee8b3
|
@ -1304,17 +1304,6 @@ static void JS_GetCurrentResponse(
|
||||||
TRI_V8_TRY_CATCH_END
|
TRI_V8_TRY_CATCH_END
|
||||||
}
|
}
|
||||||
|
|
||||||
static void JS_IsEnterprise(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
|
||||||
TRI_V8_TRY_CATCH_BEGIN(isolate);
|
|
||||||
v8::HandleScope scope(isolate);
|
|
||||||
#ifndef USE_ENTERPRISE
|
|
||||||
TRI_V8_RETURN(v8::False(isolate));
|
|
||||||
#else
|
|
||||||
TRI_V8_RETURN(v8::True(isolate));
|
|
||||||
#endif
|
|
||||||
TRI_V8_TRY_CATCH_END
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief stores the V8 actions function inside the global variable
|
/// @brief stores the V8 actions function inside the global variable
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1345,9 +1334,6 @@ void TRI_InitV8Actions(v8::Isolate* isolate, v8::Handle<v8::Context> context) {
|
||||||
TRI_AddGlobalFunctionVocbase(isolate, context,
|
TRI_AddGlobalFunctionVocbase(isolate, context,
|
||||||
TRI_V8_ASCII_STRING("SYS_REQUEST_PARTS"),
|
TRI_V8_ASCII_STRING("SYS_REQUEST_PARTS"),
|
||||||
JS_RequestParts, true);
|
JS_RequestParts, true);
|
||||||
TRI_AddGlobalFunctionVocbase(isolate, context,
|
|
||||||
TRI_V8_ASCII_STRING("SYS_IS_ENTERPRISE"),
|
|
||||||
JS_IsEnterprise);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -2732,6 +2732,18 @@ void TRI_V8ReloadRouting(v8::Isolate* isolate) {
|
||||||
TRI_V8_ASCII_STRING("reload routing"), false);
|
TRI_V8_ASCII_STRING("reload routing"), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void JS_IsEnterprise(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
||||||
|
TRI_V8_TRY_CATCH_BEGIN(isolate);
|
||||||
|
v8::HandleScope scope(isolate);
|
||||||
|
#ifndef USE_ENTERPRISE
|
||||||
|
TRI_V8_RETURN(v8::False(isolate));
|
||||||
|
#else
|
||||||
|
TRI_V8_RETURN(v8::True(isolate));
|
||||||
|
#endif
|
||||||
|
TRI_V8_TRY_CATCH_END
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief creates a TRI_vocbase_t global context
|
/// @brief creates a TRI_vocbase_t global context
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -2919,6 +2931,10 @@ void TRI_InitV8VocBridge(v8::Isolate* isolate, v8::Handle<v8::Context> context,
|
||||||
TRI_AddGlobalFunctionVocbase(isolate, context,
|
TRI_AddGlobalFunctionVocbase(isolate, context,
|
||||||
TRI_V8_ASCII_STRING("TRUSTED_PROXIES"),
|
TRI_V8_ASCII_STRING("TRUSTED_PROXIES"),
|
||||||
JS_TrustedProxies, true);
|
JS_TrustedProxies, true);
|
||||||
|
|
||||||
|
TRI_AddGlobalFunctionVocbase(isolate, context,
|
||||||
|
TRI_V8_ASCII_STRING("SYS_IS_ENTERPRISE"),
|
||||||
|
JS_IsEnterprise);
|
||||||
// .............................................................................
|
// .............................................................................
|
||||||
// create global variables
|
// create global variables
|
||||||
// .............................................................................
|
// .............................................................................
|
||||||
|
|
Loading…
Reference in New Issue