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

Side by Side Diff: fpdfsdk/include/jsapi/fxjs_v8.h

Issue 1412103010: Segv when PDF-side JS object property getter invoked from XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
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
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 // FXJS_V8 is a layer that makes it easier to define native objects in V8, but 7 // FXJS_V8 is a layer that makes it easier to define native objects in V8, but
8 // has no knowledge of PDF-specific native objects. It could in theory be used 8 // has no knowledge of PDF-specific native objects. It could in theory be used
9 // to implement other sets of native objects. 9 // to implement other sets of native objects.
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void FXJS_DefineGlobalConst(v8::Isolate* pIsolate, 121 void FXJS_DefineGlobalConst(v8::Isolate* pIsolate,
122 const wchar_t* sConstName, 122 const wchar_t* sConstName,
123 v8::Local<v8::Value> pDefault); 123 v8::Local<v8::Value> pDefault);
124 124
125 // Called after FXJS_Define* calls made. 125 // Called after FXJS_Define* calls made.
126 void FXJS_InitializeRuntime(v8::Isolate* pIsolate, 126 void FXJS_InitializeRuntime(v8::Isolate* pIsolate,
127 IJS_Runtime* pIRuntime, 127 IJS_Runtime* pIRuntime,
128 v8::Global<v8::Context>& v8PersistentContext); 128 v8::Global<v8::Context>& v8PersistentContext);
129 void FXJS_ReleaseRuntime(v8::Isolate* pIsolate, 129 void FXJS_ReleaseRuntime(v8::Isolate* pIsolate,
130 v8::Global<v8::Context>& v8PersistentContext); 130 v8::Global<v8::Context>& v8PersistentContext);
131 IJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate); 131
132 // Called as part of FXJS_InitializeRuntime, exposed so PDF can make its
133 // own contexts compatible with XFA or vice versa.
134 void FXJS_SetRuntimeForV8Context(v8::Local<v8::Context> v8Context,
135 IJS_Runtime* pIRuntime);
136
137 IJS_Runtime* FXJS_GetRuntimeFromV8Context(v8::Local<v8::Context> v8Context);
132 138
133 // Called after FXJS_InitializeRuntime call made. 139 // Called after FXJS_InitializeRuntime call made.
134 int FXJS_Execute(v8::Isolate* pIsolate, 140 int FXJS_Execute(v8::Isolate* pIsolate,
135 IJS_Context* pJSContext, 141 IJS_Context* pJSContext,
136 const wchar_t* script, 142 const wchar_t* script,
137 FXJSErr* perror); 143 FXJSErr* perror);
138 144
139 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, 145 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate,
140 IJS_Runtime* pJSContext, 146 IJS_Runtime* pJSContext,
141 int nObjDefnID); 147 int nObjDefnID);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); 224 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue);
219 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, 225 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate,
220 v8::Local<v8::Value> pValue); 226 v8::Local<v8::Value> pValue);
221 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, 227 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate,
222 v8::Local<v8::Value> pValue); 228 v8::Local<v8::Value> pValue);
223 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, 229 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate,
224 v8::Local<v8::Value> pValue); 230 v8::Local<v8::Value> pValue);
225 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); 231 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom);
226 232
227 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ 233 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/JS_Define.h » ('j') | fpdfsdk/src/javascript/JS_Runtime.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698