v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8-serialization-duplicate-tracker.h
Go to the documentation of this file.
1// Copyright 2023 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_INSPECTOR_V8_SERIALIZATION_DUPLICATE_TRACKER_H_
6#define V8_INSPECTOR_V8_SERIALIZATION_DUPLICATE_TRACKER_H_
7
9#include "src/base/vector.h"
11#include "src/inspector/protocol/Runtime.h"
12
13namespace v8_inspector {
14
16 public:
17 // Returns a `protocol::DictionaryValue` value either empty if the V8 value
18 // was not serialized yet, or filled in as a reference to previousely
19 // serialized protocol value.
20 V8_EXPORT std::unique_ptr<protocol::DictionaryValue> LinkExistingOrCreate(
21 v8::Local<v8::Value> v8Value, bool* isKnown);
22
25
26 private:
29 // Maps v8 value to corresponding serialized value.
31
32 V8_EXPORT protocol::DictionaryValue* FindKnownSerializedValue(
33 v8::Local<v8::Value> v8Value);
34
36 v8::Local<v8::Value> v8Value, protocol::DictionaryValue* serializedValue);
37};
38} // namespace v8_inspector
39
40#endif // V8_INSPECTOR_V8_SERIALIZATION_DUPLICATE_TRACKER_H_
V8_EXPORT V8SerializationDuplicateTracker(v8::Local< v8::Context > context)
V8_EXPORT void SetKnownSerializedValue(v8::Local< v8::Value > v8Value, protocol::DictionaryValue *serializedValue)
V8_EXPORT protocol::DictionaryValue * FindKnownSerializedValue(v8::Local< v8::Value > v8Value)
V8_EXPORT std::unique_ptr< protocol::DictionaryValue > LinkExistingOrCreate(v8::Local< v8::Value > v8Value, bool *isKnown)
#define V8_EXPORT
Definition v8config.h:800