Skip to content
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

src: remove unused internals from node.cc #7117

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
53 changes: 0 additions & 53 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -722,47 +722,6 @@ const char *signo_string(int signo) {
}


// Convenience methods


void ThrowError(v8::Isolate* isolate, const char* errmsg) {
Environment::GetCurrent(isolate)->ThrowError(errmsg);
}


void ThrowTypeError(v8::Isolate* isolate, const char* errmsg) {
Environment::GetCurrent(isolate)->ThrowTypeError(errmsg);
}


void ThrowRangeError(v8::Isolate* isolate, const char* errmsg) {
Environment::GetCurrent(isolate)->ThrowRangeError(errmsg);
}


void ThrowErrnoException(v8::Isolate* isolate,
int errorno,
const char* syscall,
const char* message,
const char* path) {
Environment::GetCurrent(isolate)->ThrowErrnoException(errorno,
syscall,
message,
path);
}


void ThrowUVException(v8::Isolate* isolate,
int errorno,
const char* syscall,
const char* message,
const char* path,
const char* dest) {
Environment::GetCurrent(isolate)
->ThrowUVException(errorno, syscall, message, path, dest);
}


Local<Value> ErrnoException(Isolate* isolate,
int errorno,
const char *syscall,
Expand Down Expand Up @@ -1269,18 +1228,6 @@ Local<Value> MakeCallback(Environment* env,
}


// Internal only.
Local<Value> MakeCallback(Environment* env,
Local<Object> recv,
uint32_t index,
int argc,
Local<Value> argv[]) {
Local<Value> cb_v = recv->Get(index);
CHECK(cb_v->IsFunction());
return MakeCallback(env, recv.As<Value>(), cb_v.As<Function>(), argc, argv);
}


Local<Value> MakeCallback(Environment* env,
Local<Object> recv,
Local<String> symbol,
Expand Down
22 changes: 0 additions & 22 deletions src/node_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ v8::Local<v8::Value> MakeCallback(Environment* env,
int argc = 0,
v8::Local<v8::Value>* argv = nullptr);

// Call with valid HandleScope and while inside Context scope.
v8::Local<v8::Value> MakeCallback(Environment* env,
v8::Local<v8::Object> recv,
uint32_t index,
int argc = 0,
v8::Local<v8::Value>* argv = nullptr);

// Call with valid HandleScope and while inside Context scope.
v8::Local<v8::Value> MakeCallback(Environment* env,
v8::Local<v8::Object> recv,
Expand Down Expand Up @@ -193,21 +186,6 @@ inline MUST_USE_RESULT bool ParseArrayIndex(v8::Local<v8::Value> arg,
return true;
}

void ThrowError(v8::Isolate* isolate, const char* errmsg);
void ThrowTypeError(v8::Isolate* isolate, const char* errmsg);
void ThrowRangeError(v8::Isolate* isolate, const char* errmsg);
void ThrowErrnoException(v8::Isolate* isolate,
int errorno,
const char* syscall = nullptr,
const char* message = nullptr,
const char* path = nullptr);
void ThrowUVException(v8::Isolate* isolate,
int errorno,
const char* syscall = nullptr,
const char* message = nullptr,
const char* path = nullptr,
const char* dest = nullptr);

class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
public:
inline uint32_t* zero_fill_field() { return &zero_fill_field_; }
Expand Down