v8_object_print = false
v8_postmortem_support = false
v8_use_snapshot = true
-v8_enable_extra_checks = is_debug
v8_target_arch = cpu_arch
v8_random_seed = "314159265"
if (v8_enable_i18n_support == true) {
defines += [ "V8_I18N_SUPPORT" ]
}
- if (v8_enable_extra_checks == true) {
- defines += [ "ENABLE_EXTRA_CHECKS" ]
- }
if (v8_enable_handle_zapping == true) {
defines += [ "ENABLE_HANDLE_ZAPPING" ]
}
endif
# extrachecks=on/off
ifeq ($(extrachecks), on)
- GYPFLAGS += -Dv8_enable_extra_checks=1 -Dv8_enable_handle_zapping=1
+ GYPFLAGS += -Ddcheck_always_on=1 -Dv8_enable_handle_zapping=1
endif
ifeq ($(extrachecks), off)
- GYPFLAGS += -Dv8_enable_extra_checks=0 -Dv8_enable_handle_zapping=0
+ GYPFLAGS += -Ddcheck_always_on=0 -Dv8_enable_handle_zapping=0
endif
# gdbjit=on/off
ifeq ($(gdbjit), on)
'DebugBaseCommon': {
'abstract': 1,
'variables': {
- 'v8_enable_extra_checks%': 1,
'v8_enable_handle_zapping%': 1,
},
'conditions': [
- ['v8_enable_extra_checks==1', {
- 'defines': ['ENABLE_EXTRA_CHECKS',],
- }],
['v8_enable_handle_zapping==1', {
'defines': ['ENABLE_HANDLE_ZAPPING',],
}],
}, # Debug
'Release': {
'variables': {
- 'v8_enable_extra_checks%': 0,
'v8_enable_handle_zapping%': 1,
},
'conditions': [
- ['v8_enable_extra_checks==1', {
- 'defines': ['ENABLE_EXTRA_CHECKS',],
- }],
['v8_enable_handle_zapping==1', {
'defines': ['ENABLE_HANDLE_ZAPPING',],
}],
// Implementations of OpenHandle
-#define MAKE_OPEN_HANDLE(From, To) \
- v8::internal::Handle<v8::internal::To> Utils::OpenHandle( \
- const v8::From* that, bool allow_empty_handle) { \
- EXTRA_CHECK(allow_empty_handle || that != NULL); \
- EXTRA_CHECK(that == NULL || \
- (*reinterpret_cast<v8::internal::Object* const*>(that))->Is##To()); \
- return v8::internal::Handle<v8::internal::To>( \
- reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \
+#define MAKE_OPEN_HANDLE(From, To) \
+ v8::internal::Handle<v8::internal::To> Utils::OpenHandle( \
+ const v8::From* that, bool allow_empty_handle) { \
+ DCHECK(allow_empty_handle || that != NULL); \
+ DCHECK(that == NULL || \
+ (*reinterpret_cast<v8::internal::Object* const*>(that))->Is##To()); \
+ return v8::internal::Handle<v8::internal::To>( \
+ reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \
}
OPEN_HANDLE_LIST(MAKE_OPEN_HANDLE)
#define DCHECK_NOT_NULL(p) DCHECK_NE(NULL, p)
-// "Extra checks" are lightweight checks that are enabled in some release
-// builds.
-#ifdef ENABLE_EXTRA_CHECKS
-#define EXTRA_CHECK(condition) CHECK(condition)
-#else
-#define EXTRA_CHECK(condition) ((void) 0)
-#endif
-
#endif // V8_BASE_LOGGING_H_
j(not_equal, &promote_scheduled_exception);
bind(&exception_handled);
-#if ENABLE_EXTRA_CHECKS
+#if DEBUG
// Check if the function returned a valid JavaScript value.
Label ok;
Register return_value = eax;
void Object::VerifyApiCallResultType() {
-#if ENABLE_EXTRA_CHECKS
+#if DEBUG
if (!(IsSmi() ||
IsString() ||
IsSymbol() ||
IsNull())) {
FATAL("API call returned invalid object");
}
-#endif // ENABLE_EXTRA_CHECKS
+#endif // DEBUG
}
result = args.Call(enum_fun);
}
if (result.IsEmpty()) return MaybeHandle<JSObject>();
-#if ENABLE_EXTRA_CHECKS
- CHECK(v8::Utils::OpenHandle(*result)->IsJSArray() ||
- v8::Utils::OpenHandle(*result)->HasSloppyArgumentsElements());
-#endif
+ DCHECK(v8::Utils::OpenHandle(*result)->IsJSArray() ||
+ v8::Utils::OpenHandle(*result)->HasSloppyArgumentsElements());
// Rebox before returning.
return handle(*v8::Utils::OpenHandle(*result), isolate);
}
result = args.Call(enum_fun);
}
if (result.IsEmpty()) return MaybeHandle<JSObject>();
-#if ENABLE_EXTRA_CHECKS
- CHECK(v8::Utils::OpenHandle(*result)->IsJSArray() ||
- v8::Utils::OpenHandle(*result)->HasSloppyArgumentsElements());
-#endif
+ DCHECK(v8::Utils::OpenHandle(*result)->IsJSArray() ||
+ v8::Utils::OpenHandle(*result)->HasSloppyArgumentsElements());
// Rebox before returning.
return handle(*v8::Utils::OpenHandle(*result), isolate);
}
j(not_equal, &promote_scheduled_exception);
bind(&exception_handled);
-#if ENABLE_EXTRA_CHECKS
+#if DEBUG
// Check if the function returned a valid JavaScript value.
Label ok;
Register return_value = rax;
j(not_equal, &promote_scheduled_exception);
bind(&exception_handled);
-#if ENABLE_EXTRA_CHECKS
+#if DEBUG
// Check if the function returned a valid JavaScript value.
Label ok;
Register return_value = eax;