diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-26 15:11:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-26 15:11:28 +0000 |
commit | 2cbae7328b4eb31a78db5babc4d5995971de308f (patch) | |
tree | cae010d322b164b0a4042275eac815e52e30aa47 /fxjs/cjs_field.cpp | |
parent | 75ee53784b5e51583c6c994d6eeadb7d3ce4a1b9 (diff) | |
download | pdfium-2cbae7328b4eb31a78db5babc4d5995971de308f.tar.xz |
Use ObservedPtr for CJS_Field::m_pJSField
Bug: 856354
Change-Id: Ic0ac4d189dff6f4688a6c5feb745fe8c5a5ed4bb
Reviewed-on: https://pdfium-review.googlesource.com/36150
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cjs_field.cpp')
-rw-r--r-- | fxjs/cjs_field.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp index 84835866ea..6f6455d984 100644 --- a/fxjs/cjs_field.cpp +++ b/fxjs/cjs_field.cpp @@ -205,7 +205,7 @@ void CJS_Field::ParseFieldName(const std::wstring& strFieldNameParsed, bool CJS_Field::AttachField(CJS_Document* pDocument, const WideString& csFieldName) { - m_pJSDoc = pDocument; + m_pJSDoc.Reset(pDocument); m_pFormFillEnv.Reset(pDocument->GetFormFillEnv()); m_bCanSet = m_pFormFillEnv->GetPermissions(FPDFPERM_FILL_FORM) || m_pFormFillEnv->GetPermissions(FPDFPERM_ANNOT_FORM) || @@ -2467,7 +2467,7 @@ CJS_Return CJS_Field::getArray( auto* pJSField = static_cast<CJS_Field*>(CFXJS_Engine::GetObjectPrivate(pObj)); - pJSField->AttachField(m_pJSDoc, *pStr); + pJSField->AttachField(m_pJSDoc.Get(), *pStr); pRuntime->PutArrayElement(FormFieldArray, j++, pJSField ? v8::Local<v8::Value>(pJSField->ToV8Object()) |