summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2014-10-30 13:23:42 -0700
committerTom Sepez <tsepez@chromium.org>2014-10-30 13:23:42 -0700
commitf79a69c2513a9ee1431bd36c340e4b66bc2fd2d8 (patch)
treed64514531237d7577904caf60dd34df54d4a6cd4 /fpdfsdk/src/javascript
parent2b327f83ffcceca1911479c4afddafe51f0e37ba (diff)
downloadpdfium-f79a69c2513a9ee1431bd36c340e4b66bc2fd2d8.tar.xz
For v8 Global Object, do not copy in CJS_Value constructor.
BUG=425129 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/688303003
Diffstat (limited to 'fpdfsdk/src/javascript')
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 90b324ace2..93da9bea2e 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -8,6 +8,7 @@
#include "../../include/javascript/JS_Define.h"
#include "../../include/javascript/JS_Object.h"
#include "../../include/javascript/JS_Value.h"
+#include "../../include/javascript/Document.h"
/* ---------------------------- CJS_Value ---------------------------- */
@@ -44,11 +45,18 @@ CJS_Value::CJS_Value(v8::Isolate* isolate, JSFXObject pJsObj):m_isolate(isolate
operator =(pJsObj);
}
-CJS_Value::CJS_Value(v8::Isolate* isolate, CJS_Object * pJsObj):m_isolate(isolate)
+CJS_Value::CJS_Value(v8::Isolate* isolate, CJS_Object* pJsObj):m_isolate(isolate)
{
operator =(pJsObj);
}
+CJS_Value::CJS_Value(v8::Isolate* isolate, CJS_Document* pJsDoc):m_isolate(isolate)
+{
+ m_eType = VT_object;
+ if (pJsDoc)
+ m_pValue = (JSFXObject)*pJsDoc;
+}
+
CJS_Value::CJS_Value(v8::Isolate* isolate, FX_LPCWSTR pWstr):m_isolate(isolate)
{
operator =(pWstr);