Skip to content

Commit 9b96464

Browse files
committed
src: remove long-deprecated APIs without Isolate* arg
These have been deprecated since 75adde0 (February 2014) and most likely do not see much ecosystem usage to begin with.
1 parent 69f1a2b commit 9b96464

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

src/node.h

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -401,21 +401,10 @@ NODE_EXTERN enum encoding ParseEncoding(
401401
v8::Isolate* isolate,
402402
v8::Local<v8::Value> encoding_v,
403403
enum encoding default_encoding = LATIN1);
404-
NODE_DEPRECATED("Use ParseEncoding(isolate, ...)",
405-
inline enum encoding ParseEncoding(
406-
v8::Local<v8::Value> encoding_v,
407-
enum encoding default_encoding = LATIN1) {
408-
return ParseEncoding(v8::Isolate::GetCurrent(), encoding_v, default_encoding);
409-
})
410404

411405
NODE_EXTERN void FatalException(v8::Isolate* isolate,
412406
const v8::TryCatch& try_catch);
413407

414-
NODE_DEPRECATED("Use FatalException(isolate, ...)",
415-
inline void FatalException(const v8::TryCatch& try_catch) {
416-
return FatalException(v8::Isolate::GetCurrent(), try_catch);
417-
})
418-
419408
NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
420409
const char* buf,
421410
size_t len,
@@ -427,64 +416,23 @@ NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
427416
const uint16_t* buf,
428417
size_t len);
429418

430-
NODE_DEPRECATED("Use Encode(isolate, ...)",
431-
inline v8::Local<v8::Value> Encode(
432-
const void* buf,
433-
size_t len,
434-
enum encoding encoding = LATIN1) {
435-
v8::Isolate* isolate = v8::Isolate::GetCurrent();
436-
if (encoding == UCS2) {
437-
assert(reinterpret_cast<uintptr_t>(buf) % sizeof(uint16_t) == 0 &&
438-
"UCS2 buffer must be aligned on two-byte boundary.");
439-
const uint16_t* that = static_cast<const uint16_t*>(buf);
440-
return Encode(isolate, that, len / sizeof(*that));
441-
}
442-
return Encode(isolate, static_cast<const char*>(buf), len, encoding);
443-
})
444-
445419
// Returns -1 if the handle was not valid for decoding
446420
NODE_EXTERN ssize_t DecodeBytes(v8::Isolate* isolate,
447421
v8::Local<v8::Value>,
448422
enum encoding encoding = LATIN1);
449-
NODE_DEPRECATED("Use DecodeBytes(isolate, ...)",
450-
inline ssize_t DecodeBytes(
451-
v8::Local<v8::Value> val,
452-
enum encoding encoding = LATIN1) {
453-
return DecodeBytes(v8::Isolate::GetCurrent(), val, encoding);
454-
})
455-
456423
// returns bytes written.
457424
NODE_EXTERN ssize_t DecodeWrite(v8::Isolate* isolate,
458425
char* buf,
459426
size_t buflen,
460427
v8::Local<v8::Value>,
461428
enum encoding encoding = LATIN1);
462-
NODE_DEPRECATED("Use DecodeWrite(isolate, ...)",
463-
inline ssize_t DecodeWrite(char* buf,
464-
size_t buflen,
465-
v8::Local<v8::Value> val,
466-
enum encoding encoding = LATIN1) {
467-
return DecodeWrite(v8::Isolate::GetCurrent(), buf, buflen, val, encoding);
468-
})
469-
470429
#ifdef _WIN32
471430
NODE_EXTERN v8::Local<v8::Value> WinapiErrnoException(
472431
v8::Isolate* isolate,
473432
int errorno,
474433
const char* syscall = nullptr,
475434
const char* msg = "",
476435
const char* path = nullptr);
477-
478-
NODE_DEPRECATED("Use WinapiErrnoException(isolate, ...)",
479-
inline v8::Local<v8::Value> WinapiErrnoException(int errorno,
480-
const char* syscall = nullptr, const char* msg = "",
481-
const char* path = nullptr) {
482-
return WinapiErrnoException(v8::Isolate::GetCurrent(),
483-
errorno,
484-
syscall,
485-
msg,
486-
path);
487-
})
488436
#endif
489437

490438
const char* signo_string(int errorno);

0 commit comments

Comments
 (0)