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

Side by Side Diff: fpdfsdk/src/javascript/global.cpp

Issue 1437713003: Replace CJS_Parameters with std::vector<CJS_Value>. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@todo
Patch Set: Created 5 years, 1 month 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/src/javascript/global.h ('k') | fpdfsdk/src/javascript/report.h » ('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 #include "global.h" 7 #include "global.h"
8 8
9 #include "../../include/javascript/IJavaScript.h" 9 #include "../../include/javascript/IJavaScript.h"
10 #include "JS_Context.h" 10 #include "JS_Context.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 vp.SetNull(); 197 vp.SetNull();
198 return TRUE; 198 return TRUE;
199 default: 199 default:
200 break; 200 break;
201 } 201 }
202 } 202 }
203 return FALSE; 203 return FALSE;
204 } 204 }
205 205
206 FX_BOOL JSGlobalAlternate::setPersistent(IJS_Context* cc, 206 FX_BOOL JSGlobalAlternate::setPersistent(IJS_Context* cc,
207 const CJS_Parameters& params, 207 const std::vector<CJS_Value>& params,
208 CJS_Value& vRet, 208 CJS_Value& vRet,
209 CFX_WideString& sError) { 209 CFX_WideString& sError) {
210 CJS_Context* pContext = static_cast<CJS_Context*>(cc); 210 CJS_Context* pContext = static_cast<CJS_Context*>(cc);
211 if (params.size() != 2) { 211 if (params.size() != 2) {
212 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); 212 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
213 return FALSE; 213 return FALSE;
214 } 214 }
215 215
216 auto it = m_mapGlobal.find(params[0].ToCFXByteString()); 216 auto it = m_mapGlobal.find(params[0].ToCFXByteString());
217 if (it != m_mapGlobal.end()) { 217 if (it != m_mapGlobal.end()) {
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 return CJS_Value::VT_boolean; 518 return CJS_Value::VT_boolean;
519 if (nHash == JSCONST_nDateHash) 519 if (nHash == JSCONST_nDateHash)
520 return CJS_Value::VT_date; 520 return CJS_Value::VT_date;
521 if (nHash == JSCONST_nObjectHash) 521 if (nHash == JSCONST_nObjectHash)
522 return CJS_Value::VT_object; 522 return CJS_Value::VT_object;
523 if (nHash == JSCONST_nFXobjHash) 523 if (nHash == JSCONST_nFXobjHash)
524 return CJS_Value::VT_fxobject; 524 return CJS_Value::VT_fxobject;
525 525
526 return CJS_Value::VT_unknown; 526 return CJS_Value::VT_unknown;
527 } 527 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/global.h ('k') | fpdfsdk/src/javascript/report.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698