mirror of https://gitee.com/bigwinds/arangodb
Fix v8 contexts check.
This commit is contained in:
parent
ae4233bebd
commit
96053268aa
|
@ -63,7 +63,7 @@ void ConsoleThread::run() {
|
||||||
// enter V8 context
|
// enter V8 context
|
||||||
_context = V8DealerFeature::DEALER->enterContext(_vocbase, true);
|
_context = V8DealerFeature::DEALER->enterContext(_vocbase, true);
|
||||||
|
|
||||||
if (_context != nullptr) {
|
if (_context == nullptr) {
|
||||||
LOG(FATAL) << "cannot acquire V8 context";
|
LOG(FATAL) << "cannot acquire V8 context";
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ int ScriptFeature::runScript(std::vector<std::string> const& scripts) {
|
||||||
V8Context* context =
|
V8Context* context =
|
||||||
V8DealerFeature::DEALER->enterContext(database->vocbase(), true);
|
V8DealerFeature::DEALER->enterContext(database->vocbase(), true);
|
||||||
|
|
||||||
if (context != nullptr) {
|
if (context == nullptr) {
|
||||||
LOG(FATAL) << "cannot acquire V8 context";
|
LOG(FATAL) << "cannot acquire V8 context";
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ int UnitTestsFeature::runUnitTests(std::vector<std::string> const& unitTests) {
|
||||||
V8Context* context =
|
V8Context* context =
|
||||||
V8DealerFeature::DEALER->enterContext(database->vocbase(), true);
|
V8DealerFeature::DEALER->enterContext(database->vocbase(), true);
|
||||||
|
|
||||||
if (context != nullptr) {
|
if (context == nullptr) {
|
||||||
LOG(FATAL) << "cannot acquire V8 context";
|
LOG(FATAL) << "cannot acquire V8 context";
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue