mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-02-02 20:55:00 -05:00
Run clang-format (#72)
This commit is contained in:
parent
7acbb85398
commit
ff843d6e18
2 changed files with 128 additions and 131 deletions
|
@ -218,15 +218,13 @@ v8::Value *v8__Function__Call(v8::Function *self,
|
|||
return maybe_local_to_ptr(self->Call(context, recv, argc, argv));
|
||||
}
|
||||
|
||||
v8::FunctionTemplate *
|
||||
v8__FunctionTemplate__New(v8::Isolate *isolate,
|
||||
v8::FunctionCallback callback = nullptr) {
|
||||
v8::FunctionTemplate* v8__FunctionTemplate__New(
|
||||
v8::Isolate* isolate, v8::FunctionCallback callback = nullptr) {
|
||||
return local_to_ptr(v8::FunctionTemplate::New(isolate, callback));
|
||||
}
|
||||
|
||||
v8::Function *
|
||||
v8__FunctionTemplate__GetFunction(v8::Local<v8::FunctionTemplate> self,
|
||||
v8::Local<v8::Context> context) {
|
||||
v8::Function* v8__FunctionTemplate__GetFunction(
|
||||
v8::Local<v8::FunctionTemplate> self, v8::Local<v8::Context> context) {
|
||||
return maybe_local_to_ptr(self->GetFunction(context));
|
||||
}
|
||||
int v8__FunctionCallbackInfo__Length(
|
||||
|
@ -299,8 +297,8 @@ v8::String *v8__JSON__Stringify(v8::Local<v8::Context> context,
|
|||
return maybe_local_to_ptr(v8::JSON::Stringify(context, json_object));
|
||||
}
|
||||
|
||||
v8::Promise::Resolver *
|
||||
v8__Promise__Resolver__New(v8::Local<v8::Context> context) {
|
||||
v8::Promise::Resolver* v8__Promise__Resolver__New(
|
||||
v8::Local<v8::Context> context) {
|
||||
return maybe_local_to_ptr(v8::Promise::Resolver::New(context));
|
||||
}
|
||||
|
||||
|
@ -386,8 +384,8 @@ struct v8_inspector__V8Inspector__Channel__BASE
|
|||
: public v8_inspector::V8Inspector::Channel {
|
||||
using v8_inspector::V8Inspector::Channel::Channel;
|
||||
|
||||
void
|
||||
sendResponse(int callId,
|
||||
void sendResponse(
|
||||
int callId,
|
||||
std::unique_ptr<v8_inspector::StringBuffer> message) override {
|
||||
v8_inspector__V8Inspector__Channel__BASE__sendResponse(*this, callId,
|
||||
message.release());
|
||||
|
@ -474,13 +472,13 @@ void v8_inspector__StringBuffer__DELETE(v8_inspector::StringBuffer &self) {
|
|||
delete &self;
|
||||
}
|
||||
|
||||
const v8_inspector::StringView *
|
||||
v8_inspector__StringBuffer__string(v8_inspector::StringBuffer &self) {
|
||||
const v8_inspector::StringView* v8_inspector__StringBuffer__string(
|
||||
v8_inspector::StringBuffer& self) {
|
||||
return &self.string();
|
||||
}
|
||||
|
||||
v8_inspector::StringBuffer *
|
||||
v8_inspector__StringBuffer__create(const v8_inspector::StringView &source) {
|
||||
v8_inspector::StringBuffer* v8_inspector__StringBuffer__create(
|
||||
const v8_inspector::StringView& source) {
|
||||
return v8_inspector::StringBuffer::create(source).release();
|
||||
}
|
||||
} // extern "C"
|
||||
|
|
|
@ -35,7 +35,6 @@ void construct_in_place(uninit_t<T>& buf, Args... args) {
|
|||
}
|
||||
} // namespace support
|
||||
|
||||
|
||||
template <class T>
|
||||
inline static T* local_to_ptr(v8::Local<T> local) {
|
||||
return *local;
|
||||
|
|
Loading…
Add table
Reference in a new issue