1
0
Fork 0

removed remainder of development mode

This commit is contained in:
Jan Steemann 2015-03-19 10:33:31 +01:00
parent 6b22b1e31c
commit 85308fa7f3
9 changed files with 9 additions and 21 deletions

View File

@ -942,7 +942,7 @@ char* Query::registerString (std::string const& p,
void Query::enterContext () {
if (! _contextOwnedByExterior) {
if (_context == nullptr) {
_context = _applicationV8->enterContext("STANDARD", _vocbase, false, false);
_context = _applicationV8->enterContext("STANDARD", _vocbase, false);
if (_context == nullptr) {
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "cannot enter V8 context");

View File

@ -137,7 +137,7 @@ bool ServerJob::execute () {
return false;
}
ApplicationV8::V8Context* context = _applicationV8->enterContext("STANDARD", vocbase, false, true);
ApplicationV8::V8Context* context = _applicationV8->enterContext("STANDARD", vocbase, true);
if (context == nullptr) {
TRI_ReleaseDatabaseServer(_server, vocbase);

View File

@ -1084,7 +1084,7 @@ int ArangoServer::runConsole (TRI_vocbase_t* vocbase) {
int ArangoServer::runUnitTests (TRI_vocbase_t* vocbase) {
ApplicationV8::V8Context* context = _applicationV8->enterContext("STANDARD", vocbase, true, true);
ApplicationV8::V8Context* context = _applicationV8->enterContext("STANDARD", vocbase, true);
auto isolate = context->isolate;
@ -1140,7 +1140,7 @@ int ArangoServer::runUnitTests (TRI_vocbase_t* vocbase) {
int ArangoServer::runScript (TRI_vocbase_t* vocbase) {
bool ok = false;
ApplicationV8::V8Context* context = _applicationV8->enterContext("STANDARD", vocbase, true, true);
ApplicationV8::V8Context* context = _applicationV8->enterContext("STANDARD", vocbase, true);
auto isolate = context->isolate;
{

View File

@ -92,7 +92,7 @@ void ConsoleThread::run () {
usleep(100000);
// enter V8 context
_context = _applicationV8->enterContext("STANDARD", _vocbase, true, true);
_context = _applicationV8->enterContext("STANDARD", _vocbase, true);
try {
inner();

View File

@ -337,7 +337,6 @@ void ApplicationV8::setVocbase (TRI_vocbase_t* vocbase) {
ApplicationV8::V8Context* ApplicationV8::enterContext (std::string const& name,
TRI_vocbase_s* vocbase,
bool initialise,
bool allowUseDatabase) {
CONDITION_LOCKER(guard, _contextCondition);

View File

@ -313,7 +313,6 @@ namespace triagens {
V8Context* enterContext (std::string const& name,
TRI_vocbase_s*,
bool initialise,
bool useDatabase);
////////////////////////////////////////////////////////////////////////////////

View File

@ -106,7 +106,7 @@ Job::status_t V8Job::work () {
return status_t(JOB_DONE);
}
ApplicationV8::V8Context* context = _v8Dealer->enterContext("STANDARD", _vocbase, true, false);
ApplicationV8::V8Context* context = _v8Dealer->enterContext("STANDARD", _vocbase, false);
// note: the context might be 0 in case of shut-down
if (context == nullptr) {

View File

@ -105,7 +105,7 @@ Job::status_t V8QueueJob::work () {
return status_t(JOB_DONE);
}
ApplicationV8::V8Context* context = _v8Dealer->enterContext(_queue, _vocbase, true, false);
ApplicationV8::V8Context* context = _v8Dealer->enterContext(_queue, _vocbase, false);
// note: the context might be 0 in case of shut-down
if (context == nullptr) {

View File

@ -128,9 +128,6 @@ class v8_action_t : public TRI_action_t {
void** data) {
TRI_action_result_t result;
// determine whether we should force a re-initialistion of the engine in development mode
bool allowEngineReset = false;
// allow use datase execution in rest calls
extern bool ALLOW_USE_DATABASE_IN_REST_ACTIONS;
bool allowUseDatabaseInRestActions = ALLOW_USE_DATABASE_IN_REST_ACTIONS;
@ -139,18 +136,11 @@ class v8_action_t : public TRI_action_t {
allowUseDatabaseInRestActions = true;
}
// only URLs starting with /dev will trigger an engine reset
string const& fullUrl = request->fullUrl();
if (fullUrl.find("/dev/") == 0) {
allowEngineReset = true;
}
ApplicationV8::V8Context* context = GlobalV8Dealer->enterContext(
"STANDARD",
vocbase,
! allowEngineReset,
allowUseDatabaseInRestActions);
allowUseDatabaseInRestActions
);
// note: the context might be 0 in case of shut-down
if (context == nullptr) {