diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-06 20:51:04 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-06 20:51:04 +0000 |
commit | 6ffd840c1f4d7d74a6c4c07c5791c4f3db8d50b9 (patch) | |
tree | 1020d5547830ef16b52648818232c69c65850cdf /fxjs/cjs_global.cpp | |
parent | 222d3fdf687554b298650080e2e8f47d83411651 (diff) | |
download | pdfium-6ffd840c1f4d7d74a6c4c07c5791c4f3db8d50b9.tar.xz |
Remove still more v8::Context slot usage.chromium/3452
Removes CJS_Runtime::RuntimeFromIsolateCurrentContext()
Change-Id: I51abcf32aaafac522e1595edf663507c26781357
Reviewed-on: https://pdfium-review.googlesource.com/34230
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cjs_global.cpp')
-rw-r--r-- | fxjs/cjs_global.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fxjs/cjs_global.cpp b/fxjs/cjs_global.cpp index 5834ab9600..1e01f96aee 100644 --- a/fxjs/cjs_global.cpp +++ b/fxjs/cjs_global.cpp @@ -311,9 +311,9 @@ CJS_Return CJS_Global::setPersistent( } void CJS_Global::UpdateGlobalPersistentVariables() { - CJS_Runtime* pRuntime = - static_cast<CJS_Runtime*>(CFXJS_Engine::EngineFromIsolateCurrentContext( - ToV8Object()->GetIsolate())); + CJS_Runtime* pRuntime = GetRuntime(); + if (!pRuntime) + return; for (int i = 0, sz = m_pGlobalData->GetSize(); i < sz; i++) { CJS_GlobalData_Element* pData = m_pGlobalData->GetAt(i); @@ -450,8 +450,9 @@ void CJS_Global::ObjectToArray(CJS_Runtime* pRuntime, void CJS_Global::PutObjectProperty(v8::Local<v8::Object> pObj, CJS_KeyValue* pData) { - CJS_Runtime* pRuntime = - CJS_Runtime::RuntimeFromIsolateCurrentContext(ToV8Object()->GetIsolate()); + CJS_Runtime* pRuntime = GetRuntime(); + if (pRuntime) + return; for (int i = 0, sz = pData->objData.Count(); i < sz; i++) { CJS_KeyValue* pObjData = pData->objData.GetAt(i); |