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

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

Issue 1803723002: Move xfa/src up to xfa/. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 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/runtime.h ('k') | xfa/fxjse/scope_inline.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 "xfa/src/fxjse/runtime.h" 7 #include "xfa/fxjse/runtime.h"
8 8
9 #include "fpdfsdk/include/jsapi/fxjs_v8.h" 9 #include "fpdfsdk/include/jsapi/fxjs_v8.h"
10 #include "xfa/src/fxjse/scope_inline.h" 10 #include "xfa/fxjse/scope_inline.h"
11 11
12 // Duplicates fpdfsdk's JS_Runtime.h, but keeps XFA from depending on it. 12 // Duplicates fpdfsdk's JS_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
20 static void FXJSE_KillV8() { 20 static void FXJSE_KillV8() {
(...skipping 98 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/runtime.h ('k') | xfa/fxjse/scope_inline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698