Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: convert then to async/await
  • Loading branch information
meekdenzo committed Jun 1, 2022
commit a6c4a7cc8e79eff59b2264d00d74230a9e3ed8b2
6 changes: 6 additions & 0 deletions src/inspector/main_thread_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ Deletable* MainThreadInterface::GetObjectIfExists(int id) {
return iterator->second.get();
}


// v8::Isolate *isolate = v8::Isolate::TryGetCurrent();
// CHECK_NOT_NULL(isolate);
// uint16_t *buffer;
// v8::String::NewFromUtf8(isolate, message.data())->Write(buffer);

Comment thread
meekdenzo marked this conversation as resolved.
Outdated
std::unique_ptr<StringBuffer> Utf8ToStringView(const std::string& message) {
icu::UnicodeString utf16 = icu::UnicodeString::fromUTF8(
icu::StringPiece(message.data(), message.length()));
Expand Down
25 changes: 13 additions & 12 deletions test/parallel/test-debugger-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,22 @@ function launchTarget(...args) {
assert.ifError(error);
}

return launchTarget('--inspect=0', script)
.then(({ childProc, host, port }) => {
(async () => {
try {
const { childProc, host, port } = await launchTarget('--inspect=0', script);
target = childProc;
cli = startCLI([`${host || '127.0.0.1'}:${port}`]);
return cli.waitForPrompt();
})
.then(() => cli.command('sb("alive.js", 3)'))
.then(() => cli.waitFor(/break/))
.then(() => cli.waitForPrompt())
.then(() => {
await cli.waitForPrompt();
await cli.command('sb("alive.js", 3)');
await cli.waitFor(/break/);
await cli.waitForPrompt();
assert.match(
cli.output,
/> 3 {3}\+\+x;/,
'marks the 3rd line');
})
.then(() => cleanup())
.then(null, cleanup);
'marks the 3rd line'
);
} finally {
cleanup();
}
})();
}