This commit is contained in:
Bert Belder 2019-10-17 18:01:55 -07:00
parent 1764355b5c
commit 5bca90b074
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,57 @@
#include <memory>
#include <utility>
extern "C" {
using namespace v8_inspector;
void v8_inspector__Channel__EXTENDER__sendResponse(Channel& self,
int callId,
StringBuffer* message);
void v8_inspector__Channel__EXTENDER__sendNotification(Channel& self,
StringBuffer* message);
void v8_inspector__Channel__EXTENDER__flushProtocolNotifications(Channel& self);
} // extern "C"
namespace v8_inspector {
struct Channel__EXTENDER : public Channel {
using Channel::Channel;
static_assert(sizeof(std::unique_ptr<StringBuffer>) == sizeof(StringBuffer*));
void sendResponse(int callId,
std::unique_ptr<StringBuffer> message) override {
v8_inspector__Channel__EXTENDER__sendResponse(*this, callId,
message.release());
}
void sendNotification(std::unique_ptr<StringBuffer> message) override {
v8_inspector__Channel__EXTENDER__sendNotification(*this, message.release());
}
void flushProtocolNotifications() override {
v8_inspector__Channel__EXTENDER__flushProtocolNotifications(*this);
}
};
} // namespace v8_inspector
extern "C" {
using namespace v8_inspector;
void v8_inspector__Channel__EXTENDER__CTOR(uninit_t<Channel__EXTENDER>& buf) {
new (std::launder(&buf)) Channel__EXTENDER();
}
void v8_inspector__Channel__DTOR(Channel& self) {
self.~Channel();
}
void v8_inspector__Channel__sendResponse(Channel& self,
int callId,
StringBuffer* message) {
self.sendResponse(callId,
static_cast<std::unique_ptr<StringBuffer>>(message));
}
void v8_inspector__Channel__sendNotification(Channel& self,
StringBuffer* message) {
self.sendNotification(static_cast<std::unique_ptr<StringBuffer>>(message));
}
void v8_inspector__Channel__flushProtocolNotifications(Channel& self) {
self.flushProtocolNotifications();
}
} // extern "C"

1
v8 Symbolic link
View File

@ -0,0 +1 @@
d:/deno2/third_party/v8