summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cfxjse_class.cpp')
-rw-r--r--fxjs/cfxjse_class.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/fxjs/cfxjse_class.cpp b/fxjs/cfxjse_class.cpp
index e7e54c8867..9207fd5094 100644
--- a/fxjs/cfxjse_class.cpp
+++ b/fxjs/cfxjse_class.cpp
@@ -112,8 +112,7 @@ void DynPropGetterAdapter_MethodCallback(
WideString err = JSFormatErrorString(pClassDescriptor->name, *szPropName,
result.Error());
v8::MaybeLocal<v8::String> str = v8::String::NewFromUtf8(
- info.GetIsolate(), ByteString::FromUnicode(err).c_str(),
- v8::NewStringType::kNormal);
+ info.GetIsolate(), err.ToDefANSI().c_str(), v8::NewStringType::kNormal);
info.GetIsolate()->ThrowException(str.ToLocalChecked());
return;
}