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

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: rewrite comments. 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void FXJS_DefineGlobalConst(v8::Isolate* pIsolate, 122 void FXJS_DefineGlobalConst(v8::Isolate* pIsolate,
123 const wchar_t* sConstName, 123 const wchar_t* sConstName,
124 v8::Local<v8::Value> pDefault); 124 v8::Local<v8::Value> pDefault);
125 125
126 // Called after FXJS_Define* calls made. 126 // Called after FXJS_Define* calls made.
127 void FXJS_InitializeRuntime(v8::Isolate* pIsolate, 127 void FXJS_InitializeRuntime(v8::Isolate* pIsolate,
128 IJS_Runtime* pIRuntime, 128 IJS_Runtime* pIRuntime,
129 v8::Global<v8::Context>& v8PersistentContext); 129 v8::Global<v8::Context>& v8PersistentContext);
130 void FXJS_ReleaseRuntime(v8::Isolate* pIsolate, 130 void FXJS_ReleaseRuntime(v8::Isolate* pIsolate,
131 v8::Global<v8::Context>& v8PersistentContext); 131 v8::Global<v8::Context>& v8PersistentContext);
132 IJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate); 132
133 // Called as part of FXJS_InitializeRuntime, exposed so PDF can make its
134 // own contexts compatible with XFA or vice versa.
135 void FXJS_SetRuntimeForV8Context(v8::Local<v8::Context> v8Context,
136 IJS_Runtime* pIRuntime);
137
138 IJS_Runtime* FXJS_GetRuntimeFromV8Context(v8::Local<v8::Context> v8Context);
133 139
134 // Called after FXJS_InitializeRuntime call made. 140 // Called after FXJS_InitializeRuntime call made.
135 int FXJS_Execute(v8::Isolate* pIsolate, 141 int FXJS_Execute(v8::Isolate* pIsolate,
136 IJS_Context* pJSContext, 142 IJS_Context* pJSContext,
137 const wchar_t* script, 143 const wchar_t* script,
138 FXJSErr* perror); 144 FXJSErr* perror);
139 145
140 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, 146 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate,
141 IJS_Runtime* pJSContext, 147 IJS_Runtime* pJSContext,
142 int nObjDefnID); 148 int nObjDefnID);
(...skipping 75 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