Commit 90380049 authored by dcarney's avatar dcarney Committed by Commit bot

Revert of make ToLocalCheck crash in release mode (patchset #1 id:1 of...

Revert of make ToLocalCheck crash in release mode (patchset #1 id:1 of https://codereview.chromium.org/1043363005/)

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}
parent 9596b36c
......@@ -439,7 +439,7 @@ class MaybeLocal {
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>
......@@ -6909,7 +6909,9 @@ Local<T> Eternal<T>::Get(Isolate* isolate) {
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_);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment