Commit 877be382 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[cleanup] Fix use of BooleanValue

Replace use of deprecated Maybe<bool> BooleanValue(Context) with bool
BooleanValue(Isolate*). The Maybe version is unnecessary as BooleanValue
can never throw.

Bug: v8:7279, v8:8238
Change-Id: Iaf827cedbf158c59727900ff551962e2af4ccbac
Reviewed-on: https://chromium-review.googlesource.com/c/1344063
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: default avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609765}
parent 90940f0e
...@@ -44,7 +44,9 @@ Local<Value> Converter<bool>::ToV8(Isolate* isolate, bool val) { ...@@ -44,7 +44,9 @@ Local<Value> Converter<bool>::ToV8(Isolate* isolate, bool val) {
} }
bool Converter<bool>::FromV8(Isolate* isolate, Local<Value> val, bool* out) { bool Converter<bool>::FromV8(Isolate* isolate, Local<Value> val, bool* out) {
return FromMaybe(val->BooleanValue(isolate->GetCurrentContext()), out); *out = val->BooleanValue(isolate);
// BooleanValue cannot throw.
return true;
} }
Local<Value> Converter<int32_t>::ToV8(Isolate* isolate, int32_t val) { Local<Value> Converter<int32_t>::ToV8(Isolate* isolate, int32_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