| 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/fx_crypt.h" |
| 10 #include "third_party/base/stl_util.h" | 10 #include "third_party/base/stl_util.h" |
| 11 | 11 |
| 12 #define JS_MAXGLOBALDATA (1024 * 4 - 8) | 12 #define JS_MAXGLOBALDATA (1024 * 4 - 8) |
| 13 | 13 |
| 14 #define READER_JS_GLOBALDATA_FILENAME L"Reader_JsGlobal.Data" | 14 #define READER_JS_GLOBALDATA_FILENAME L"Reader_JsGlobal.Data" |
| 15 #define PHANTOM_JS_GLOBALDATA_FILENAME L"Phantom_JsGlobal.Data" | 15 #define PHANTOM_JS_GLOBALDATA_FILENAME L"Phantom_JsGlobal.Data" |
| 16 #define SDK_JS_GLOBALDATA_FILENAME L"SDK_JsGlobal.Data" | 16 #define SDK_JS_GLOBALDATA_FILENAME L"SDK_JsGlobal.Data" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 case JS_GlobalDataType::NULLOBJ: { | 385 case JS_GlobalDataType::NULLOBJ: { |
| 386 uint32_t dwNameLen = (uint32_t)name.GetLength(); | 386 uint32_t dwNameLen = (uint32_t)name.GetLength(); |
| 387 sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); | 387 sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); |
| 388 sData.AppendString(name); | 388 sData.AppendString(name); |
| 389 sData.AppendBlock(&pData->nType, sizeof(uint32_t)); | 389 sData.AppendBlock(&pData->nType, sizeof(uint32_t)); |
| 390 } break; | 390 } break; |
| 391 default: | 391 default: |
| 392 break; | 392 break; |
| 393 } | 393 } |
| 394 } | 394 } |
| OLD | NEW |