Reason for revert:
breaks some devtools things
Original issue's description:
> make ToLocalCheck crash in release mode
>
> R=svenpanne@chromium.org
> BUG=
>
> Committed: https://crrev.com/
ce7cc5119c1e031bf1eb8476fbf5e55bef738f94
> Cr-Commit-Position: refs/heads/master@{#27585}
TBR=svenpanne@chromium.org,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/
1057873003
Cr-Commit-Position: refs/heads/master@{#27589}
return !IsEmpty();
}
- // Will crash if the MaybeLocal<> is empty.
+ // Will crash when checks are enabled if the MaybeLocal<> is empty.
V8_INLINE Local<T> ToLocalChecked();
template <class S>
template <class T>
Local<T> MaybeLocal<T>::ToLocalChecked() {
- if (V8_UNLIKELY(val_ == nullptr)) V8::ToLocalEmpty();
+#ifdef V8_ENABLE_CHECKS
+ if (val_ == nullptr) V8::ToLocalEmpty();
+#endif
return Local<T>(val_);
}