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

Side by Side Diff: fpdfsdk/javascript/global.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: Pass by const ref 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/javascript/JS_GlobalData.cpp ('k') | fpdfsdk/javascript/global.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_JAVASCRIPT_GLOBAL_H_ 7 #ifndef FPDFSDK_JAVASCRIPT_GLOBAL_H_
8 #define FPDFSDK_JAVASCRIPT_GLOBAL_H_ 8 #define FPDFSDK_JAVASCRIPT_GLOBAL_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 CFX_WideString& sError); 52 CFX_WideString& sError);
53 FX_BOOL DelProperty(IJS_Context* cc, 53 FX_BOOL DelProperty(IJS_Context* cc,
54 const FX_WCHAR* propname, 54 const FX_WCHAR* propname,
55 CFX_WideString& sError); 55 CFX_WideString& sError);
56 void Initial(CPDFDoc_Environment* pApp); 56 void Initial(CPDFDoc_Environment* pApp);
57 57
58 private: 58 private:
59 void UpdateGlobalPersistentVariables(); 59 void UpdateGlobalPersistentVariables();
60 void CommitGlobalPersisitentVariables(IJS_Context* cc); 60 void CommitGlobalPersisitentVariables(IJS_Context* cc);
61 void DestroyGlobalPersisitentVariables(); 61 void DestroyGlobalPersisitentVariables();
62 FX_BOOL SetGlobalVariables(const FX_CHAR* propname, 62 FX_BOOL SetGlobalVariables(const CFX_ByteString& propname,
63 int nType, 63 int nType,
64 double dData, 64 double dData,
65 bool bData, 65 bool bData,
66 const CFX_ByteString& sData, 66 const CFX_ByteString& sData,
67 v8::Local<v8::Object> pData, 67 v8::Local<v8::Object> pData,
68 bool bDefaultPersistent); 68 bool bDefaultPersistent);
69 void ObjectToArray(IJS_Context* cc, 69 void ObjectToArray(IJS_Context* cc,
70 v8::Local<v8::Object> pObj, 70 v8::Local<v8::Object> pObj,
71 CJS_GlobalVariableArray& array); 71 CJS_GlobalVariableArray& array);
72 void PutObjectProperty(v8::Local<v8::Object> obj, CJS_KeyValue* pData); 72 void PutObjectProperty(v8::Local<v8::Object> obj, CJS_KeyValue* pData);
(...skipping 10 matching lines...) Expand all
83 ~CJS_Global() override {} 83 ~CJS_Global() override {}
84 84
85 // CJS_Object 85 // CJS_Object
86 void InitInstance(IJS_Runtime* pIRuntime) override; 86 void InitInstance(IJS_Runtime* pIRuntime) override;
87 87
88 DECLARE_SPECIAL_JS_CLASS(); 88 DECLARE_SPECIAL_JS_CLASS();
89 JS_SPECIAL_STATIC_METHOD(setPersistent, JSGlobalAlternate, global); 89 JS_SPECIAL_STATIC_METHOD(setPersistent, JSGlobalAlternate, global);
90 }; 90 };
91 91
92 #endif // FPDFSDK_JAVASCRIPT_GLOBAL_H_ 92 #endif // FPDFSDK_JAVASCRIPT_GLOBAL_H_
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/JS_GlobalData.cpp ('k') | fpdfsdk/javascript/global.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698