3640583fcc
This CL extracts some functionality from inspector-test.cc to be reused by the inspector fuzzer. It also puts all functions in the v8::internal namespace, and adds separate functions in v8::internal to be called by ::main such that we have direct access to the full namespace there. R=szuend@chromium.org Bug: chromium:1142437 Change-Id: I671317822bdc1c721334469811893affcc460f8f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2501847 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#70821}
37 lines
1.0 KiB
C++
37 lines
1.0 KiB
C++
// Copyright 2020 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_TEST_INSPECTOR_UTILS_H_
|
|
#define V8_TEST_INSPECTOR_UTILS_H_
|
|
|
|
#include <vector>
|
|
|
|
#include "include/v8-inspector.h"
|
|
#include "include/v8.h"
|
|
#include "src/base/macros.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
std::vector<uint8_t> ToBytes(v8::Isolate*, v8::Local<v8::String>);
|
|
|
|
v8::Local<v8::String> ToV8String(v8::Isolate*, const char*);
|
|
|
|
v8::Local<v8::String> ToV8String(v8::Isolate*, const std::vector<uint8_t>&);
|
|
|
|
v8::Local<v8::String> ToV8String(v8::Isolate*, const std::string&);
|
|
|
|
v8::Local<v8::String> ToV8String(v8::Isolate*, const std::vector<uint16_t>&);
|
|
|
|
v8::Local<v8::String> ToV8String(v8::Isolate*, const v8_inspector::StringView&);
|
|
|
|
std::vector<uint16_t> ToVector(v8::Isolate*, v8::Local<v8::String>);
|
|
|
|
std::vector<uint16_t> ToVector(const v8_inspector::StringView&);
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|
|
|
|
#endif // V8_TEST_INSPECTOR_UTILS_H_
|