FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ClearScript/ClearScript/V8/ClearScriptV8/V8ObjectHelpers.cpp at master · killvxk/ClearScript · GitHub
killvxk
/
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
/
V8ObjectHelpers.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
99 lines (72 loc) · 3.45 KB
Breadcrumbs
ClearScript
/
ClearScript
/
V8
/
ClearScriptV8
/
V8ObjectHelpers.cpp
Copy path
File metadata and controls
99 lines (72 loc) · 3.45 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//
Copyright (c) Microsoft Corporation. All rights reserved.
//
Licensed under the MIT license.
#
include
"
ClearScriptV8Native.h
"
//
-----------------------------------------------------------------------------
//
local helper functions
//
-----------------------------------------------------------------------------
V8ObjectHolderImpl*
GetHolderImpl
(V8ObjectHolder* pHolder)
{
return
static_cast
<V8ObjectHolderImpl*>(pHolder);
}
//
-----------------------------------------------------------------------------
//
V8ObjectHelpers implementation
//
-----------------------------------------------------------------------------
V8Value
V8ObjectHelpers::GetProperty
(V8ObjectHolder* pHolder,
const
StdString& name)
{
return
GetHolderImpl
(pHolder)->
GetProperty
(name);
}
//
-----------------------------------------------------------------------------
void
V8ObjectHelpers::SetProperty
(V8ObjectHolder* pHolder,
const
StdString& name,
const
V8Value& value)
{
GetHolderImpl
(pHolder)->
SetProperty
(name, value);
}
//
-----------------------------------------------------------------------------
bool
V8ObjectHelpers::DeleteProperty
(V8ObjectHolder* pHolder,
const
StdString& name)
{
return
GetHolderImpl
(pHolder)->
DeleteProperty
(name);
}
//
-----------------------------------------------------------------------------
void
V8ObjectHelpers::GetPropertyNames
(V8ObjectHolder* pHolder, std::vector<StdString>& names)
{
GetHolderImpl
(pHolder)->
GetPropertyNames
(names);
}
//
-----------------------------------------------------------------------------
V8Value
V8ObjectHelpers::GetProperty
(V8ObjectHolder* pHolder,
int
index)
{
return
GetHolderImpl
(pHolder)->
GetProperty
(index);
}
//
-----------------------------------------------------------------------------
void
V8ObjectHelpers::SetProperty
(V8ObjectHolder* pHolder,
int
index,
const
V8Value& value)
{
GetHolderImpl
(pHolder)->
SetProperty
(index, value);
}
//
-----------------------------------------------------------------------------
bool
V8ObjectHelpers::DeleteProperty
(V8ObjectHolder* pHolder,
int
index)
{
return
GetHolderImpl
(pHolder)->
DeleteProperty
(index);
}
//
-----------------------------------------------------------------------------
void
V8ObjectHelpers::GetPropertyIndices
(V8ObjectHolder* pHolder, std::vector<
int
>& indices)
{
GetHolderImpl
(pHolder)->
GetPropertyIndices
(indices);
}
//
-----------------------------------------------------------------------------
V8Value
V8ObjectHelpers::Invoke
(V8ObjectHolder* pHolder,
bool
asConstructor,
const
std::vector<V8Value>& args)
{
return
GetHolderImpl
(pHolder)->
Invoke
(asConstructor, args);
}
//
-----------------------------------------------------------------------------
V8Value
V8ObjectHelpers::InvokeMethod
(V8ObjectHolder* pHolder,
const
StdString& name,
const
std::vector<V8Value>& args)
{
return
GetHolderImpl
(pHolder)->
InvokeMethod
(name, args);
}
//
-----------------------------------------------------------------------------
void
V8ObjectHelpers::GetArrayBufferOrViewInfo
(V8ObjectHolder* pHolder, V8Value& arrayBuffer,
size_t
& offset,
size_t
& size,
size_t
& length)
{
return
GetHolderImpl
(pHolder)->
GetArrayBufferOrViewInfo
(arrayBuffer, offset, size, length);
}
//
-----------------------------------------------------------------------------
void
V8ObjectHelpers::InvokeWithArrayBufferOrViewData
(V8ObjectHolder* pHolder, ArrayBufferOrViewDataCallbackT* pCallback,
void
* pvArg)
{
return
GetHolderImpl
(pHolder)->
InvokeWithArrayBufferOrViewData
(pCallback, pvArg);
}
Back
|
FazBrowse Home
|
New Git URL