From af3d6cc8910fbddc7518f9d54f4c4ad0dd25ed40 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 19 Oct 2018 18:06:52 +0000 Subject: Roll v8/ 604c50c84..626844157 (516 commits) https://chromium.googlesource.com/v8/v8.git/+log/604c50c84e67..626844157660 Version 7.1.314 Update a few callers to avoid deprecated V8 APIs. Created with: roll-dep v8 Change-Id: Ifabcae4956364cf1d02d4c2fe6074806fadc7ee3 Reviewed-on: https://pdfium-review.googlesource.com/c/43595 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- DEPS | 2 +- fxjs/cfx_v8.cpp | 6 +----- fxjs/cfxjse_arguments.cpp | 4 +--- fxjs/cfxjse_value.cpp | 3 +-- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/DEPS b/DEPS index 806bfee62d..7d5b16c7f7 100644 --- a/DEPS +++ b/DEPS @@ -33,7 +33,7 @@ vars = { 'skia_revision': '588f879677d4f36e16a42dd96876534f104c2e2f', 'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6', 'trace_event_revision': '211b3ed9d0481b4caddbee1322321b86a483ca1f', - 'v8_revision': '604c50c84e672c099cbcbd6dd19928a0381d9688', + 'v8_revision': '626844157660a5c78c5f7e958db5c6af498ef35b', 'yasm_source_revision': '720b70524a4424b15fc57e82263568c8ba0496ad', 'zlib_revision': 'dcf1d0f8c952f76cfceefb4ba61e004f93ad7287', } diff --git a/fxjs/cfx_v8.cpp b/fxjs/cfx_v8.cpp index 73d95ae9b4..bd0e5eb62a 100644 --- a/fxjs/cfx_v8.cpp +++ b/fxjs/cfx_v8.cpp @@ -150,11 +150,7 @@ int CFX_V8::ToInt32(v8::Local pValue) { bool CFX_V8::ToBoolean(v8::Local pValue) { if (pValue.IsEmpty()) return false; - v8::Local context = m_pIsolate->GetCurrentContext(); - v8::MaybeLocal maybe_boolean = pValue->ToBoolean(context); - if (maybe_boolean.IsEmpty()) - return false; - return maybe_boolean.ToLocalChecked()->Value(); + return pValue->BooleanValue(m_pIsolate.Get()); } double CFX_V8::ToDouble(v8::Local pValue) { diff --git a/fxjs/cfxjse_arguments.cpp b/fxjs/cfxjse_arguments.cpp index 174fd3c2c7..e18e3e3d96 100644 --- a/fxjs/cfxjse_arguments.cpp +++ b/fxjs/cfxjse_arguments.cpp @@ -28,9 +28,7 @@ std::unique_ptr CFXJSE_Arguments::GetValue(int32_t index) const { } bool CFXJSE_Arguments::GetBoolean(int32_t index) const { - return (*m_pInfo)[index] - ->BooleanValue(m_pInfo->GetIsolate()->GetCurrentContext()) - .FromMaybe(false); + return (*m_pInfo)[index]->BooleanValue(m_pInfo->GetIsolate()); } int32_t CFXJSE_Arguments::GetInt32(int32_t index) const { diff --git a/fxjs/cfxjse_value.cpp b/fxjs/cfxjse_value.cpp index 8bc243e097..a84b571223 100644 --- a/fxjs/cfxjse_value.cpp +++ b/fxjs/cfxjse_value.cpp @@ -406,8 +406,7 @@ bool CFXJSE_Value::ToBoolean() const { CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate()); v8::Local hValue = v8::Local::New(GetIsolate(), m_hValue); - return hValue->BooleanValue(GetIsolate()->GetCurrentContext()) - .FromMaybe(false); + return hValue->BooleanValue(GetIsolate()); } float CFXJSE_Value::ToFloat() const { -- cgit v1.2.3