summaryrefslogtreecommitdiff
path: root/src/env-inl.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2017-07-25 12:20:40 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2017-07-27 17:11:08 +0200
commit1b7372f2fb55f704b885e1097e2ec0381068c855 (patch)
treefe5ca729487cca97831c5bbd6edafd280a9c5814 /src/env-inl.h
parent1fa67c7fc2ef9fc226545f5de22c51964dbc27e1 (diff)
downloadandroid-node-v8-1b7372f2fb55f704b885e1097e2ec0381068c855.tar.gz
android-node-v8-1b7372f2fb55f704b885e1097e2ec0381068c855.tar.bz2
android-node-v8-1b7372f2fb55f704b885e1097e2ec0381068c855.zip
src: replace ASSERT with CHECK
Builds always have asserts enabled so there is no point distinguishing between debug-only checks and run-time checks. Replace calls to ASSERT and friends with their CHECK counterparts. Fixes: https://github.com/nodejs/node/issues/14461 PR-URL: https://github.com/nodejs/node/pull/14474 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: XadillaX <admin@xcoder.in>
Diffstat (limited to 'src/env-inl.h')
-rw-r--r--src/env-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/env-inl.h b/src/env-inl.h
index cf7304c98d..e160fe27d8 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -272,14 +272,14 @@ inline Environment* Environment::GetCurrent(v8::Local<v8::Context> context) {
inline Environment* Environment::GetCurrent(
const v8::FunctionCallbackInfo<v8::Value>& info) {
- ASSERT(info.Data()->IsExternal());
+ CHECK(info.Data()->IsExternal());
return static_cast<Environment*>(info.Data().As<v8::External>()->Value());
}
template <typename T>
inline Environment* Environment::GetCurrent(
const v8::PropertyCallbackInfo<T>& info) {
- ASSERT(info.Data()->IsExternal());
+ CHECK(info.Data()->IsExternal());
// XXX(bnoordhuis) Work around a g++ 4.9.2 template type inferrer bug
// when the expression is written as info.Data().As<v8::External>().
v8::Local<v8::Value> data = info.Data();