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

Unified Diff: fpdfsdk/javascript/JS_Value.cpp

Issue 2151023002: Do not try to v8::Object::Clone() any objects (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | fxjs/fxjs_v8.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_Value.cpp
diff --git a/fpdfsdk/javascript/JS_Value.cpp b/fpdfsdk/javascript/JS_Value.cpp
index 53d6d598334febc6a0faf5d7fcb0d65df51cee92..6bc45c555d0808790abfa0fd14f71644bb0858dc 100644
--- a/fpdfsdk/javascript/JS_Value.cpp
+++ b/fpdfsdk/javascript/JS_Value.cpp
@@ -186,7 +186,7 @@ void CJS_Value::operator=(float fValue) {
}
void CJS_Value::operator=(v8::Local<v8::Object> pObj) {
- m_pValue = FXJS_NewObject(m_pJSRuntime->GetIsolate(), pObj);
+ m_pValue = pObj;
m_eType = VT_fxobject;
}
@@ -208,7 +208,7 @@ void CJS_Value::operator=(const FX_WCHAR* pWstr) {
}
void CJS_Value::SetNull() {
- m_pValue = FXJS_NewNull();
+ m_pValue = FXJS_NewNull(m_pJSRuntime->GetIsolate());
m_eType = VT_null;
}
@@ -217,8 +217,7 @@ void CJS_Value::operator=(const FX_CHAR* pStr) {
}
void CJS_Value::operator=(CJS_Array& array) {
- m_pValue =
- FXJS_NewObject2(m_pJSRuntime->GetIsolate(), (v8::Local<v8::Array>)array);
+ m_pValue = static_cast<v8::Local<v8::Array>>(array);
m_eType = VT_object;
}
« no previous file with comments | « no previous file | fxjs/fxjs_v8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698