summaryrefslogtreecommitdiff
path: root/fxjs/cjx_node.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 21:34:00 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 21:34:00 +0000
commit31ed75b714b80b8497b35825bb926c5abb035299 (patch)
tree01b2ed5bee1665b665f77a0d8f6f676906bfbb82 /fxjs/cjx_node.cpp
parent71335de2577ae27d00f03aeb007bf6b9c90d9391 (diff)
downloadpdfium-31ed75b714b80b8497b35825bb926c5abb035299.tar.xz
Rename CXFA_Stroke to CXFA_StrokeData
This CL renames CXFA_Stroke to CXFA_StrokeData to show it is part of the data hierarchy. Change-Id: If0041c410630c61129ed1ff0879c68244ad01aa5 Reviewed-on: https://pdfium-review.googlesource.com/18013 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjx_node.cpp')
-rw-r--r--fxjs/cjx_node.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp
index d81c8d5f00..2422a0f9b6 100644
--- a/fxjs/cjx_node.cpp
+++ b/fxjs/cjx_node.cpp
@@ -2590,6 +2590,10 @@ void CJX_Node::Script_InstanceManager_InsertInstance(
}
int32_t iIndex = pArguments->GetInt32(0);
+ bool bBind = false;
+ if (argc == 2)
+ bBind = pArguments->GetInt32(1) == 0 ? false : true;
+
int32_t iCount = GetXFANode()->GetCount();
if (iIndex < 0 || iIndex > iCount) {
ThrowIndexOutOfBoundsException();
@@ -2602,8 +2606,7 @@ void CJX_Node::Script_InstanceManager_InsertInstance(
return;
}
- CXFA_Node* pNewInstance =
- GetXFANode()->CreateInstance(argc == 2 && pArguments->GetInt32(1) != 0);
+ CXFA_Node* pNewInstance = GetXFANode()->CreateInstance(bBind);
GetXFANode()->InsertItem(pNewInstance, iIndex, iCount, true);
pArguments->GetReturnValue()->Assign(
GetDocument()->GetScriptContext()->GetJSValueFromMap(pNewInstance));