Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Unified Diff: include/v8.h

Issue 1043363005: make ToLocalCheck crash in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 8b2f39d1235ab534b5d884185a7561110eeaf62a..c4536d6a7c10f9ed1816ec6850945dee2968bb9f 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -439,7 +439,7 @@ class MaybeLocal {
return !IsEmpty();
}
- // Will crash when checks are enabled if the MaybeLocal<> is empty.
+ // Will crash if the MaybeLocal<> is empty.
V8_INLINE Local<T> ToLocalChecked();
template <class S>
@@ -6909,9 +6909,7 @@ Local<T> Eternal<T>::Get(Isolate* isolate) {
template <class T>
Local<T> MaybeLocal<T>::ToLocalChecked() {
-#ifdef V8_ENABLE_CHECKS
- if (val_ == nullptr) V8::ToLocalEmpty();
-#endif
+ if (V8_UNLIKELY(val_ == nullptr)) V8::ToLocalEmpty();
return Local<T>(val_);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698