Skip to content

Commit

Permalink
src: remove unused internals from node.cc
Browse files Browse the repository at this point in the history
Remove a couple of internal methods that are neither exported in
the public headers nor used internally anywhere.

PR-URL: #7117
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
addaleax committed Jun 6, 2016
1 parent e7f1c00 commit de4161d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 75 deletions.
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

0 comments on commit de4161d

Please sign in to comment.