Skip to content

Commit

Permalink
Revert of make ToLocalCheck crash in release mode (patchset nwjs#1 id…
Browse files Browse the repository at this point in the history
…: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}
  • Loading branch information
dcarney authored and Commit bot committed Apr 2, 2015
1 parent 9596b36 commit 9038004
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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_);
}

Expand Down

0 comments on commit 9038004

Please sign in to comment.