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

Unified Diff: fpdfsdk/javascript/JS_Value.h

Issue 2628233002: Custom toString() methods may delete annots. (Closed)
Patch Set: Created 3 years, 11 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
Index: fpdfsdk/javascript/JS_Value.h
diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h
index ff2c62098094c3d57a3ba2cdca7e38b53eb5170a..313f0c3e7b78c421acbb6c8eea0a1beca0d7a48e 100644
--- a/fpdfsdk/javascript/JS_Value.h
+++ b/fpdfsdk/javascript/JS_Value.h
@@ -92,6 +92,7 @@ class CJS_PropValue {
CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; }
CJS_Value* GetJSValue() { return &m_Value; }
+ // These calls may re-enter JS (and hence invalidate objects).
void operator<<(int val);
void operator>>(int&) const;
void operator<<(bool val);
@@ -127,13 +128,15 @@ class CJS_Array {
virtual ~CJS_Array();
void Attach(v8::Local<v8::Array> pArray);
+ int GetLength(CJS_Runtime* pRuntime) const;
+
+ // These two calls may re-enter JS (and hence invalidate objects).
void GetElement(CJS_Runtime* pRuntime,
unsigned index,
CJS_Value& value) const;
void SetElement(CJS_Runtime* pRuntime,
unsigned index,
const CJS_Value& value);
- int GetLength(CJS_Runtime* pRuntime) const;
v8::Local<v8::Array> ToV8Array(CJS_Runtime* pRuntime) const;

Powered by Google App Engine
This is Rietveld 408576698