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

Unified Diff: fpdfsdk/javascript/JS_Value.h

Issue 2217253002: Remove backpointer to runtime from CJS_Array. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove non-const refs Created 4 years, 4 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/javascript/Field.cpp ('k') | fpdfsdk/javascript/JS_Value.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_Value.h
diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h
index 01b4e5ba4537337716d7b350836f014fb8f1e17d..75c40a60a17303dd8c2133d55d615e2c941a416c 100644
--- a/fpdfsdk/javascript/JS_Value.h
+++ b/fpdfsdk/javascript/JS_Value.h
@@ -40,7 +40,7 @@ class CJS_Value {
CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pObj);
CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr);
CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr);
- CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array);
+ CJS_Value(CJS_Runtime* pRuntime, const CJS_Array& array);
CJS_Value(const CJS_Value& other);
~CJS_Value();
@@ -129,21 +129,23 @@ class CJS_PropValue : public CJS_Value {
class CJS_Array {
public:
- explicit CJS_Array(CJS_Runtime* pRuntime);
+ CJS_Array();
CJS_Array(const CJS_Array& other);
virtual ~CJS_Array();
void Attach(v8::Local<v8::Array> pArray);
- void GetElement(unsigned index, CJS_Value& value) const;
- void SetElement(unsigned index, CJS_Value value);
+ void GetElement(v8::Isolate* pIsolate,
+ unsigned index,
+ CJS_Value& value) const;
+ void SetElement(v8::Isolate* pIsolate,
+ unsigned index,
+ const CJS_Value& value);
int GetLength() const;
- v8::Local<v8::Array> ToV8Array() const;
- CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; }
+ v8::Local<v8::Array> ToV8Array(v8::Isolate* pIsolate) const;
private:
mutable v8::Local<v8::Array> m_pArray;
- CJS_Runtime* const m_pJSRuntime;
};
class CJS_Date {
« no previous file with comments | « fpdfsdk/javascript/Field.cpp ('k') | fpdfsdk/javascript/JS_Value.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698