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

Side by Side Diff: xfa/fxjse/runtime.cpp

Issue 1863163002: Move code from fpdfsdk/include to the sub directories. (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 unified diff | Download patch
« no previous file with comments | « xfa/fxjse/DEPS ('k') | no next file » | 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 "xfa/fxjse/runtime.h" 7 #include "xfa/fxjse/runtime.h"
8 8
9 #include "fpdfsdk/include/jsapi/fxjs_v8.h" 9 #include "fpdfsdk/jsapi/include/fxjs_v8.h"
10 #include "xfa/fxjse/scope_inline.h" 10 #include "xfa/fxjse/scope_inline.h"
11 11
12 // Duplicates fpdfsdk's cjs_runtime.h, but keeps XFA from depending on it. 12 // Duplicates fpdfsdk's cjs_runtime.h, but keeps XFA from depending on it.
13 // TODO(tsepez): make a single version of this. 13 // TODO(tsepez): make a single version of this.
14 class FXJSE_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { 14 class FXJSE_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
15 void* Allocate(size_t length) override { return calloc(1, length); } 15 void* Allocate(size_t length) override { return calloc(1, length); }
16 void* AllocateUninitialized(size_t length) override { return malloc(length); } 16 void* AllocateUninitialized(size_t length) override { return malloc(length); }
17 void Free(void* data, size_t length) override { free(data); } 17 void Free(void* data, size_t length) override { free(data); }
18 }; 18 };
19 19
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void CFXJSE_RuntimeList::RemoveAllRuntimes( 119 void CFXJSE_RuntimeList::RemoveAllRuntimes(
120 CFXJSE_RuntimeList::RuntimeDisposeCallback lpfnDisposeCallback) { 120 CFXJSE_RuntimeList::RuntimeDisposeCallback lpfnDisposeCallback) {
121 int32_t iSize = m_RuntimeList.GetSize(); 121 int32_t iSize = m_RuntimeList.GetSize();
122 if (lpfnDisposeCallback) { 122 if (lpfnDisposeCallback) {
123 for (int32_t iIdx = 0; iIdx < iSize; iIdx++) { 123 for (int32_t iIdx = 0; iIdx < iSize; iIdx++) {
124 lpfnDisposeCallback(m_RuntimeList[iIdx]); 124 lpfnDisposeCallback(m_RuntimeList[iIdx]);
125 } 125 }
126 } 126 }
127 m_RuntimeList.RemoveAll(); 127 m_RuntimeList.RemoveAll();
128 } 128 }
OLDNEW
« no previous file with comments | « xfa/fxjse/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698