Avoid calls to deprecated GetIsolate methods Use the stored isolate instead. After this landed https://crrev.com/c/6613837 will advance the deprecation of the methods in the V8 API. Bug: 427885584 R=tsepez@chromium.org Change-Id: I7ce29779f5de501ef56c60d5cfdd91772e056d8e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/133910 Commit-Queue: Lei Zhang <thestig@chromium.org> Auto-Submit: Clemens Backes <clemensb@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fxjs/cjs_global.cpp b/fxjs/cjs_global.cpp index d2d52bc..af29d4c 100644 --- a/fxjs/cjs_global.cpp +++ b/fxjs/cjs_global.cpp
@@ -515,7 +515,7 @@ pTemp->sData = sData; break; case CFX_Value::DataType::kObject: - pTemp->pData.Reset(pData->GetIsolate(), pData); + pTemp->pData.Reset(GetRuntime()->GetIsolate(), pData); break; case CFX_Value::DataType::kNull: break; @@ -542,7 +542,7 @@ break; case CFX_Value::DataType::kObject: pNewData->nType = CFX_Value::DataType::kObject; - pNewData->pData.Reset(pData->GetIsolate(), pData); + pNewData->pData.Reset(GetRuntime()->GetIsolate(), pData); pNewData->bPersistent = bDefaultPersistent; break; case CFX_Value::DataType::kNull:
diff --git a/fxjs/cjs_object.cpp b/fxjs/cjs_object.cpp index da9184c..163d73f 100644 --- a/fxjs/cjs_object.cpp +++ b/fxjs/cjs_object.cpp
@@ -41,7 +41,7 @@ } CJS_Object::CJS_Object(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime) - : v8_object_(pObject->GetIsolate(), pObject), runtime_(pRuntime) {} + : v8_object_(pRuntime->GetIsolate(), pObject), runtime_(pRuntime) {} CJS_Object::CJS_Object(v8::Local<v8::Object> object, v8::Isolate* isolate) : v8_object_(isolate, object) {}