summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_arguments.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-29 23:18:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-29 23:18:08 +0000
commitd5f427901b52e1311ab51f16e87459ec34691591 (patch)
tree7dd25968b86a92bcba4db82361df989f118df4a4 /fxjs/cfxjse_arguments.cpp
parent9e90e7987de10832b505cc0b46abf502b6f5eb7a (diff)
downloadpdfium-d5f427901b52e1311ab51f16e87459ec34691591.tar.xz
Stop using deprecated V8 APIs in CJS_Runtime.
Also for CFXJSE_Arguments. Change-Id: I15bfa4e09675bb48aecfa0c55539bf8dc50675e6 Reviewed-on: https://pdfium-review.googlesource.com/41370 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_arguments.cpp')
-rw-r--r--fxjs/cfxjse_arguments.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fxjs/cfxjse_arguments.cpp b/fxjs/cfxjse_arguments.cpp
index 0b0dc39953..174fd3c2c7 100644
--- a/fxjs/cfxjse_arguments.cpp
+++ b/fxjs/cfxjse_arguments.cpp
@@ -49,7 +49,9 @@ float CFXJSE_Arguments::GetFloat(int32_t index) const {
ByteString CFXJSE_Arguments::GetUTF8String(int32_t index) const {
v8::Isolate* isolate = m_pInfo->GetIsolate();
- v8::Local<v8::String> hString = (*m_pInfo)[index]->ToString(isolate);
+ v8::Local<v8::Value> info = (*m_pInfo)[index];
+ v8::Local<v8::String> hString =
+ info->ToString(isolate->GetCurrentContext()).ToLocalChecked();
v8::String::Utf8Value szStringVal(isolate, hString);
return ByteString(*szStringVal);
}