Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: fpdfsdk/src/javascript/JS_Value.cpp

Issue 688303003: For v8 Global Object, do not copy in CJS_Value constructor. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: whitespace Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/javascript/JS_Value.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Value.cpp
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 90b324ace20b19cedec8db35b779bd9c56e9b3ff..93da9bea2e144639170c0a4ea6da07133f53493c 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);
« no previous file with comments | « fpdfsdk/include/javascript/JS_Value.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698