Repository navigation
Expand file tree
/
Copy pathObject.h
More file actions
56 lines (44 loc) · 1.41 KB
/
Copy pathObject.h
File metadata and controls
56 lines (44 loc) · 1.41 KB
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
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#ifndef HERMES_JSLIB_OBJECT_H
#define HERMES_JSLIB_OBJECT_H
#include "hermes/VM/CallResult.h"
#include "hermes/VM/HermesValue.h"
#include "hermes/VM/JSObject.h"
#include "hermes/VM/NativeArgs.h"
#include "hermes/VM/Runtime.h"
namespace hermes {
namespace vm {
// This file declares some functions in Object which are also used by
// Reflect.
CallResult<bool>
defineProperty(Runtime &runtime, NativeArgs args, PropOpFlags opFlags);
CallResult<HermesValue> getOwnPropertyDescriptor(
Runtime &runtime,
Handle<JSObject> object,
Handle<> key);
CallResult<HermesValue> getPrototypeOf(Runtime &runtime, Handle<JSObject> obj);
CallResult<HermesValue> getOwnPropertyKeysAsStrings(
Handle<JSObject> selfHandle,
Runtime &runtime,
OwnKeysFlags okFlags);
/// "Kind" provided to enumerableOwnProperties to request different
/// representation of the properties in the object.
enum class EnumerableOwnPropertiesKind {
Key,
Value,
KeyValue,
};
/// ES8.0 7.3.21.
/// EnumerableOwnProperties gets the requested properties based on \p kind.
CallResult<HermesValue> enumerableOwnProperties_RJS(
Runtime &runtime,
Handle<JSObject> objHandle,
EnumerableOwnPropertiesKind kind);
} // namespace vm
} // namespace hermes
#endif