OLD | NEW |
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 "fpdfsdk/javascript/JS_GlobalData.h" | 7 #include "fpdfsdk/javascript/JS_GlobalData.h" |
8 | 8 |
9 #include "core/fdrm/crypto/include/fx_crypt.h" | 9 #include "core/fdrm/crypto/include/fx_crypt.h" |
10 #include "fpdfsdk/include/javascript/IJavaScript.h" | |
11 #include "third_party/base/stl_util.h" | 10 #include "third_party/base/stl_util.h" |
12 | 11 |
13 #define JS_MAXGLOBALDATA (1024 * 4 - 8) | 12 #define JS_MAXGLOBALDATA (1024 * 4 - 8) |
14 | 13 |
15 /* --------------------- CJS_GlobalVariableArray --------------------- */ | 14 /* --------------------- CJS_GlobalVariableArray --------------------- */ |
16 | 15 |
17 CJS_GlobalVariableArray::CJS_GlobalVariableArray() {} | 16 CJS_GlobalVariableArray::CJS_GlobalVariableArray() {} |
18 | 17 |
19 CJS_GlobalVariableArray::~CJS_GlobalVariableArray() { | 18 CJS_GlobalVariableArray::~CJS_GlobalVariableArray() { |
20 Empty(); | 19 Empty(); |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 case JS_GLOBALDATA_TYPE_NULL: { | 453 case JS_GLOBALDATA_TYPE_NULL: { |
455 uint32_t dwNameLen = (uint32_t)name.GetLength(); | 454 uint32_t dwNameLen = (uint32_t)name.GetLength(); |
456 sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); | 455 sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); |
457 sData.AppendString(name); | 456 sData.AppendString(name); |
458 sData.AppendBlock(&wType, sizeof(uint32_t)); | 457 sData.AppendBlock(&wType, sizeof(uint32_t)); |
459 } break; | 458 } break; |
460 default: | 459 default: |
461 break; | 460 break; |
462 } | 461 } |
463 } | 462 } |
OLD | NEW |