| OLD | NEW |
| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // Call before making FXJS_PrepareIsolate call. | 72 // Call before making FXJS_PrepareIsolate call. |
| 73 void FXJS_Initialize(unsigned int embedderDataSlot, v8::Isolate* pIsolate); | 73 void FXJS_Initialize(unsigned int embedderDataSlot, v8::Isolate* pIsolate); |
| 74 void FXJS_Release(); | 74 void FXJS_Release(); |
| 75 | 75 |
| 76 // Gets the global isolate set by FXJS_Initialize(), or makes a new one each | 76 // Gets the global isolate set by FXJS_Initialize(), or makes a new one each |
| 77 // time if there is no such isolate. Returns true if a new isolate had to be | 77 // time if there is no such isolate. Returns true if a new isolate had to be |
| 78 // created. | 78 // created. |
| 79 bool FXJS_GetIsolate(v8::Isolate** pResultIsolate); | 79 bool FXJS_GetIsolate(v8::Isolate** pResultIsolate); |
| 80 | 80 |
| 81 // Get the global isolate's ref count. |
| 82 size_t FXJS_GlobalIsolateRefCount(); |
| 83 |
| 81 // Call before making FXJS_Define* calls. Resources allocated here are cleared | 84 // Call before making FXJS_Define* calls. Resources allocated here are cleared |
| 82 // as part of FXJS_ReleaseRuntime(). | 85 // as part of FXJS_ReleaseRuntime(). |
| 83 void FXJS_PrepareIsolate(v8::Isolate* pIsolate); | 86 void FXJS_PrepareIsolate(v8::Isolate* pIsolate); |
| 84 | 87 |
| 85 // Call before making JS_Define* calls. Resources allocated here are cleared | 88 // Call before making JS_Define* calls. Resources allocated here are cleared |
| 86 // as part of JS_ReleaseRuntime(). | 89 // as part of JS_ReleaseRuntime(). |
| 87 void JS_PrepareIsolate(v8::Isolate* pIsolate); | 90 void JS_PrepareIsolate(v8::Isolate* pIsolate); |
| 88 | 91 |
| 89 // Always returns a valid, newly-created objDefnID. | 92 // Always returns a valid, newly-created objDefnID. |
| 90 int FXJS_DefineObj(v8::Isolate* pIsolate, | 93 int FXJS_DefineObj(v8::Isolate* pIsolate, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); | 220 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); |
| 218 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, | 221 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, |
| 219 v8::Local<v8::Value> pValue); | 222 v8::Local<v8::Value> pValue); |
| 220 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, | 223 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, |
| 221 v8::Local<v8::Value> pValue); | 224 v8::Local<v8::Value> pValue); |
| 222 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, | 225 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, |
| 223 v8::Local<v8::Value> pValue); | 226 v8::Local<v8::Value> pValue); |
| 224 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); | 227 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); |
| 225 | 228 |
| 226 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ | 229 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ |
| OLD | NEW |