FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ClearScript/ClearScript/V8/ClearScriptV8/V8Isolate.h at master · phxnsharp/ClearScript · GitHub
phxnsharp
/
ClearScript
Public
forked from
ClearFoundry/ClearScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ClearScript
/
ClearScript
/
V8
/
ClearScriptV8
/
V8Isolate.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
81 lines (66 loc) · 2.89 KB
Breadcrumbs
ClearScript
/
ClearScript
/
V8
/
ClearScriptV8
/
V8Isolate.h
Copy path
File metadata and controls
81 lines (66 loc) · 2.89 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
Copyright (c) Microsoft Corporation. All rights reserved.
//
Licensed under the MIT license.
#
pragma
once
//
-----------------------------------------------------------------------------
//
V8Isolate
//
-----------------------------------------------------------------------------
class
V8Isolate
:
public
WeakRefTarget
<V8Isolate>, public IV8Entity
{
public:
enum
class
TaskKind
:
uint16_t
{
Worker,
DelayedWorker,
Foreground,
DelayedForeground,
NonNestableForeground,
NonNestableDelayedForeground,
Count
};
struct
Options
final
{
bool
EnableDebugging =
false
;
bool
EnableRemoteDebugging =
false
;
bool
EnableDynamicModuleImports =
false
;
int
DebugPort =
0
;
};
struct
Statistics
final
{
using
TaskCounts = std::array<
size_t
,
static_cast
<
size_t
>(TaskKind::Count)>;
void
BumpPostedTaskCount
(TaskKind kind)
{
++PostedTaskCounts[
static_cast
<
size_t
>(kind)];
}
void
BumpInvokedTaskCount
(TaskKind kind)
{
++InvokedTaskCounts[
static_cast
<
size_t
>(kind)];
}
size_t
ScriptCount =
0
;
size_t
ScriptCacheSize =
0
;
size_t
ModuleCount =
0
;
TaskCounts PostedTaskCounts = {};
TaskCounts InvokedTaskCounts = {};
};
static
V8Isolate*
Create
(
const
StdString& name,
const
v8::ResourceConstraints* pConstraints,
const
Options& options);
static
size_t
GetInstanceCount
();
virtual
size_t
GetMaxHeapSize
() = 0;
virtual
void
SetMaxHeapSize
(
size_t
value) = 0;
virtual
double
GetHeapSizeSampleInterval
() = 0;
virtual
void
SetHeapSizeSampleInterval
(
double
value) = 0;
virtual
size_t
GetMaxStackUsage
() = 0;
virtual
void
SetMaxStackUsage
(
size_t
value) = 0;
virtual
void
AwaitDebuggerAndPause
() = 0;
virtual
V8ScriptHolder*
Compile
(
const
V8DocumentInfo& documentInfo, StdString&& code) = 0;
virtual
V8ScriptHolder*
Compile
(
const
V8DocumentInfo& documentInfo, StdString&& code, V8CacheType cacheType, std::vector<
uint8_t
>& cacheBytes) = 0;
virtual
V8ScriptHolder*
Compile
(
const
V8DocumentInfo& documentInfo, StdString&& code, V8CacheType cacheType,
const
std::vector<
uint8_t
>& cacheBytes,
bool
& cacheAccepted) = 0;
virtual
void
GetHeapStatistics
(v8::HeapStatistics& heapStatistics) = 0;
virtual
Statistics
GetStatistics
() = 0;
virtual
void
CollectGarbage
(
bool
exhaustive) = 0;
typedef
void
CpuProfileCallbackT
(
const
v8::CpuProfile& profile,
void
* pvArg);
virtual
bool
BeginCpuProfile
(
const
StdString& name, v8::CpuProfilingMode mode,
bool
recordSamples) = 0;
virtual
bool
EndCpuProfile
(
const
StdString& name, CpuProfileCallbackT* pCallback,
void
* pvArg) = 0;
virtual
void
CollectCpuProfileSample
() = 0;
virtual
uint32_t
GetCpuProfileSampleInterval
() = 0;
virtual
void
SetCpuProfileSampleInterval
(
uint32_t
value) = 0;
virtual
~V8Isolate
() {}
};
Back
|
FazBrowse Home
|
New Git URL