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

Unified Diff: fpdfsdk/javascript/JS_GlobalData.h

Issue 1876203002: Pass CFX_ByteStrings rather than raw ptrs to JS_GlobalData. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 | fpdfsdk/javascript/JS_GlobalData.cpp » ('j') | fpdfsdk/javascript/JS_GlobalData.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_GlobalData.h
diff --git a/fpdfsdk/javascript/JS_GlobalData.h b/fpdfsdk/javascript/JS_GlobalData.h
index 65bb921ad91c713ed527de1a75c55e3c82ec6074..6eda1a0d36fa9669a36ed158bb92f2d7566a6ef1 100644
--- a/fpdfsdk/javascript/JS_GlobalData.h
+++ b/fpdfsdk/javascript/JS_GlobalData.h
@@ -64,17 +64,16 @@ class CJS_GlobalData {
static CJS_GlobalData* GetRetainedInstance(CPDFDoc_Environment* pApp);
void Release();
- void SetGlobalVariableNumber(const FX_CHAR* propname, double dData);
- void SetGlobalVariableBoolean(const FX_CHAR* propname, bool bData);
- void SetGlobalVariableString(const FX_CHAR* propname,
+ void SetGlobalVariableNumber(CFX_ByteString propname, double dData);
Tom Sepez 2016/04/11 17:51:06 Note: not const, since the first thing the code wo
Lei Zhang 2016/04/11 19:27:48 Doesn't the style guide frown upon passing by valu
Tom Sepez 2016/04/11 20:29:54 Not sure. Fair enough though. Will do.
+ void SetGlobalVariableBoolean(CFX_ByteString propname, bool bData);
+ void SetGlobalVariableString(CFX_ByteString propname,
const CFX_ByteString& sData);
- void SetGlobalVariableObject(const FX_CHAR* propname,
+ void SetGlobalVariableObject(CFX_ByteString propname,
const CJS_GlobalVariableArray& array);
- void SetGlobalVariableNull(const FX_CHAR* propname);
-
- FX_BOOL SetGlobalVariablePersistent(const FX_CHAR* propname,
+ void SetGlobalVariableNull(CFX_ByteString propname);
+ FX_BOOL SetGlobalVariablePersistent(CFX_ByteString propname,
FX_BOOL bPersistent);
- FX_BOOL DeleteGlobalVariable(const FX_CHAR* propname);
+ FX_BOOL DeleteGlobalVariable(CFX_ByteString propname);
int32_t GetSize() const;
CJS_GlobalData_Element* GetAt(int index) const;
@@ -93,9 +92,9 @@ class CJS_GlobalData {
void LoadGlobalPersistentVariables();
void SaveGlobalPersisitentVariables();
- CJS_GlobalData_Element* GetGlobalVariable(const FX_CHAR* propname);
- iterator FindGlobalVariable(const FX_CHAR* propname);
- const_iterator FindGlobalVariable(const FX_CHAR* propname) const;
+ CJS_GlobalData_Element* GetGlobalVariable(const CFX_ByteString& sPropname);
+ iterator FindGlobalVariable(const CFX_ByteString& sPropname);
+ const_iterator FindGlobalVariable(const CFX_ByteString& sPropname) const;
void LoadFileBuffer(const FX_WCHAR* sFilePath,
uint8_t*& pBuffer,
« no previous file with comments | « no previous file | fpdfsdk/javascript/JS_GlobalData.cpp » ('j') | fpdfsdk/javascript/JS_GlobalData.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698