-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APIs required to implement inspector #205
Comments
|
I'm prototyping now on types, you might be right, I'll get back on that
👍
You are right, looks like previous implementation did convert to void InspectorFrontend::Send(const v8_inspector::StringView& string) {
v8::HandleScope handle_scope(isolate_);
int length = static_cast<int>(string.length());
DCHECK_LT(length, v8::String::kMaxLength);
Local<String> message =
(string.is8Bit()
? v8::String::NewFromOneByte(
isolate_,
reinterpret_cast<const uint8_t*>(string.characters8()),
v8::NewStringType::kNormal, length)
: v8::String::NewFromTwoByte(
isolate_,
reinterpret_cast<const uint16_t*>(string.characters16()),
v8::NewStringType::kNormal, length))
.ToLocalChecked();
String::Utf8Value utf8(isolate_, message);
std::string str(*utf8);
char* cstr = &str[0u];
deno_->inspector_message_cb_(deno_->hack_, cstr);
} |
Okay, checked, we need that conversion because those messages are pushed/pulled via WS socket which requires |
In order to solve denoland/deno#106 we would also need the following APIs exposed: A V8 blog post describes the process in detail. |
Closing this as the currently bound APIs were sufficient to implement the inspector in Deno. If other APIs mentioned in this thread (e.g. Profiler.*) are still missing and still needed, feel free to open a separate issue (or PR). |
v8_inspector::V8Inspector
create
connect
StringView
v8_inspector::ContextInfo
new
v8_inspector::InspectorSession
dispatchProtocolMessage
schedulePauseOnNextStatement
String
out ofStringView
if it is two-byte string (!string_view.is_8_bit()
)CC @piscisaureus
The text was updated successfully, but these errors were encountered: