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

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

Issue 1366053003: XFA: Pass IFXJS_Runtime via V8 contexts, not V8 isolates (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 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
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 // PDFium wrapper around V8 APIs. PDFium code should include this file rather 7 // PDFium wrapper around V8 APIs. PDFium code should include this file rather
8 // than including V8 headers directly. 8 // than including V8 headers directly.
9 9
10 #ifndef FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ 10 #ifndef FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_
(...skipping 21 matching lines...) Expand all
32 const wchar_t* srcline; 32 const wchar_t* srcline;
33 unsigned linnum; 33 unsigned linnum;
34 }; 34 };
35 35
36 class FXJS_PerIsolateData { 36 class FXJS_PerIsolateData {
37 public: 37 public:
38 static void SetUp(v8::Isolate* pIsolate); 38 static void SetUp(v8::Isolate* pIsolate);
39 static FXJS_PerIsolateData* Get(v8::Isolate* pIsolate); 39 static FXJS_PerIsolateData* Get(v8::Isolate* pIsolate);
40 40
41 CFX_PtrArray m_ObjectDefnArray; 41 CFX_PtrArray m_ObjectDefnArray;
42 IFXJS_Runtime* m_pFXJSRuntime;
43 CFXJSE_RuntimeData* m_pFXJSERuntimeData; 42 CFXJSE_RuntimeData* m_pFXJSERuntimeData;
44 43
45 protected: 44 protected:
46 FXJS_PerIsolateData() 45 FXJS_PerIsolateData() : m_pFXJSERuntimeData(nullptr) {}
47 : m_pFXJSRuntime(nullptr), m_pFXJSERuntimeData(nullptr) {}
48 }; 46 };
49 47
50 extern const wchar_t kFXJSValueNameString[]; 48 extern const wchar_t kFXJSValueNameString[];
51 extern const wchar_t kFXJSValueNameNumber[]; 49 extern const wchar_t kFXJSValueNameNumber[];
52 extern const wchar_t kFXJSValueNameBoolean[]; 50 extern const wchar_t kFXJSValueNameBoolean[];
53 extern const wchar_t kFXJSValueNameDate[]; 51 extern const wchar_t kFXJSValueNameDate[];
54 extern const wchar_t kFXJSValueNameObject[]; 52 extern const wchar_t kFXJSValueNameObject[];
55 extern const wchar_t kFXJSValueNameFxobj[]; 53 extern const wchar_t kFXJSValueNameFxobj[];
56 extern const wchar_t kFXJSValueNameNull[]; 54 extern const wchar_t kFXJSValueNameNull[];
57 extern const wchar_t kFXJSValueNameUndefined[]; 55 extern const wchar_t kFXJSValueNameUndefined[];
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); 213 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue);
216 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, 214 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate,
217 v8::Local<v8::Value> pValue); 215 v8::Local<v8::Value> pValue);
218 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, 216 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate,
219 v8::Local<v8::Value> pValue); 217 v8::Local<v8::Value> pValue);
220 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, 218 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate,
221 v8::Local<v8::Value> pValue); 219 v8::Local<v8::Value> pValue);
222 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); 220 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom);
223 221
224 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ 222 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698