summaryrefslogtreecommitdiff
path: root/fxjs/cjs_document.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-14 23:40:10 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-14 23:40:10 +0000
commit55ccb526913debb3269a33792bbd61b05656ec46 (patch)
treea98152baf9d4a5dcf1c76ecaf53cbae35720d2b8 /fxjs/cjs_document.cpp
parent48d62c3a5f57eb3397a335bea4a5a30de2fcb955 (diff)
downloadpdfium-55ccb526913debb3269a33792bbd61b05656ec46.tar.xz
Remove optional argument from NewFXJSBoundObject().
Additionally, we have a pre-existing enum type that is more meaningful than just a boolean. Change-Id: Ie6ad13a3c9b22e34dedf7a5a9b5b9cc2a49b1f03 Reviewed-on: https://pdfium-review.googlesource.com/40190 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_document.cpp')
-rw-r--r--fxjs/cjs_document.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/fxjs/cjs_document.cpp b/fxjs/cjs_document.cpp
index fa9826d1ae..7e89e40230 100644
--- a/fxjs/cjs_document.cpp
+++ b/fxjs/cjs_document.cpp
@@ -247,8 +247,8 @@ CJS_Return CJS_Document::getField(
if (pPDFForm->CountFields(wideName) <= 0)
return CJS_Return(pRuntime->NewUndefined());
- v8::Local<v8::Object> pFieldObj =
- pRuntime->NewFXJSBoundObject(CJS_Field::GetObjDefnID());
+ v8::Local<v8::Object> pFieldObj = pRuntime->NewFXJSBoundObject(
+ CJS_Field::GetObjDefnID(), FXJSOBJTYPE_DYNAMIC);
if (pFieldObj.IsEmpty())
return CJS_Return(JSMessage::kBadObjectError);
@@ -1012,8 +1012,8 @@ CJS_Return CJS_Document::getAnnot(
if (!pSDKBAAnnot)
return CJS_Return(JSMessage::kBadObjectError);
- v8::Local<v8::Object> pObj =
- pRuntime->NewFXJSBoundObject(CJS_Annot::GetObjDefnID());
+ v8::Local<v8::Object> pObj = pRuntime->NewFXJSBoundObject(
+ CJS_Annot::GetObjDefnID(), FXJSOBJTYPE_DYNAMIC);
if (pObj.IsEmpty())
return CJS_Return(JSMessage::kBadObjectError);
@@ -1047,8 +1047,8 @@ CJS_Return CJS_Document::getAnnots(
if (!pSDKAnnotCur)
return CJS_Return(JSMessage::kBadObjectError);
- v8::Local<v8::Object> pObj =
- pRuntime->NewFXJSBoundObject(CJS_Annot::GetObjDefnID());
+ v8::Local<v8::Object> pObj = pRuntime->NewFXJSBoundObject(
+ CJS_Annot::GetObjDefnID(), FXJSOBJTYPE_DYNAMIC);
if (pObj.IsEmpty())
return CJS_Return(JSMessage::kBadObjectError);
@@ -1119,8 +1119,8 @@ CJS_Return CJS_Document::get_icons(CJS_Runtime* pRuntime) {
v8::Local<v8::Array> Icons = pRuntime->NewArray();
int i = 0;
for (const auto& name : m_IconNames) {
- v8::Local<v8::Object> pObj =
- pRuntime->NewFXJSBoundObject(CJS_Icon::GetObjDefnID());
+ v8::Local<v8::Object> pObj = pRuntime->NewFXJSBoundObject(
+ CJS_Icon::GetObjDefnID(), FXJSOBJTYPE_DYNAMIC);
if (pObj.IsEmpty())
return CJS_Return(JSMessage::kBadObjectError);
@@ -1151,8 +1151,8 @@ CJS_Return CJS_Document::getIcon(
if (it == m_IconNames.end())
return CJS_Return(JSMessage::kBadObjectError);
- v8::Local<v8::Object> pObj =
- pRuntime->NewFXJSBoundObject(CJS_Icon::GetObjDefnID());
+ v8::Local<v8::Object> pObj = pRuntime->NewFXJSBoundObject(
+ CJS_Icon::GetObjDefnID(), FXJSOBJTYPE_DYNAMIC);
if (pObj.IsEmpty())
return CJS_Return(JSMessage::kBadObjectError);
@@ -1301,8 +1301,8 @@ CJS_Return CJS_Document::getPageNumWords(
CJS_Return CJS_Document::getPrintParams(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {
- v8::Local<v8::Object> pRetObj =
- pRuntime->NewFXJSBoundObject(CJS_PrintParamsObj::GetObjDefnID());
+ v8::Local<v8::Object> pRetObj = pRuntime->NewFXJSBoundObject(
+ CJS_PrintParamsObj::GetObjDefnID(), FXJSOBJTYPE_DYNAMIC);
if (pRetObj.IsEmpty())
return CJS_Return(JSMessage::kBadObjectError);
return CJS_Return(JSMessage::kNotSupportedError);