summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfx_v8.cpp6
-rw-r--r--fxjs/cfxjse_arguments.cpp4
-rw-r--r--fxjs/cfxjse_value.cpp3
3 files changed, 3 insertions, 10 deletions
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<v8::Value> pValue) {
bool CFX_V8::ToBoolean(v8::Local<v8::Value> pValue) {
if (pValue.IsEmpty())
return false;
- v8::Local<v8::Context> context = m_pIsolate->GetCurrentContext();
- v8::MaybeLocal<v8::Boolean> 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<v8::Value> 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_Value> 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<v8::Value> hValue =
v8::Local<v8::Value>::New(GetIsolate(), m_hValue);
- return hValue->BooleanValue(GetIsolate()->GetCurrentContext())
- .FromMaybe(false);
+ return hValue->BooleanValue(GetIsolate());
}
float CFXJSE_Value::ToFloat() const {