Skip to content

Commit 5f714ac

Browse files
addaleaxjasnell
authored andcommitted
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. PR-URL: #23178 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 987bfcf commit 5f714ac

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

src/node.h

-52
Original file line numberDiff line numberDiff line change
@@ -390,21 +390,10 @@ NODE_EXTERN enum encoding ParseEncoding(
390390
v8::Isolate* isolate,
391391
v8::Local<v8::Value> encoding_v,
392392
enum encoding default_encoding = LATIN1);
393-
NODE_DEPRECATED("Use ParseEncoding(isolate, ...)",
394-
inline enum encoding ParseEncoding(
395-
v8::Local<v8::Value> encoding_v,
396-
enum encoding default_encoding = LATIN1) {
397-
return ParseEncoding(v8::Isolate::GetCurrent(), encoding_v, default_encoding);
398-
})
399393

400394
NODE_EXTERN void FatalException(v8::Isolate* isolate,
401395
const v8::TryCatch& try_catch);
402396

403-
NODE_DEPRECATED("Use FatalException(isolate, ...)",
404-
inline void FatalException(const v8::TryCatch& try_catch) {
405-
return FatalException(v8::Isolate::GetCurrent(), try_catch);
406-
})
407-
408397
NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
409398
const char* buf,
410399
size_t len,
@@ -416,64 +405,23 @@ NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
416405
const uint16_t* buf,
417406
size_t len);
418407

419-
NODE_DEPRECATED("Use Encode(isolate, ...)",
420-
inline v8::Local<v8::Value> Encode(
421-
const void* buf,
422-
size_t len,
423-
enum encoding encoding = LATIN1) {
424-
v8::Isolate* isolate = v8::Isolate::GetCurrent();
425-
if (encoding == UCS2) {
426-
assert(reinterpret_cast<uintptr_t>(buf) % sizeof(uint16_t) == 0 &&
427-
"UCS2 buffer must be aligned on two-byte boundary.");
428-
const uint16_t* that = static_cast<const uint16_t*>(buf);
429-
return Encode(isolate, that, len / sizeof(*that));
430-
}
431-
return Encode(isolate, static_cast<const char*>(buf), len, encoding);
432-
})
433-
434408
// Returns -1 if the handle was not valid for decoding
435409
NODE_EXTERN ssize_t DecodeBytes(v8::Isolate* isolate,
436410
v8::Local<v8::Value>,
437411
enum encoding encoding = LATIN1);
438-
NODE_DEPRECATED("Use DecodeBytes(isolate, ...)",
439-
inline ssize_t DecodeBytes(
440-
v8::Local<v8::Value> val,
441-
enum encoding encoding = LATIN1) {
442-
return DecodeBytes(v8::Isolate::GetCurrent(), val, encoding);
443-
})
444-
445412
// returns bytes written.
446413
NODE_EXTERN ssize_t DecodeWrite(v8::Isolate* isolate,
447414
char* buf,
448415
size_t buflen,
449416
v8::Local<v8::Value>,
450417
enum encoding encoding = LATIN1);
451-
NODE_DEPRECATED("Use DecodeWrite(isolate, ...)",
452-
inline ssize_t DecodeWrite(char* buf,
453-
size_t buflen,
454-
v8::Local<v8::Value> val,
455-
enum encoding encoding = LATIN1) {
456-
return DecodeWrite(v8::Isolate::GetCurrent(), buf, buflen, val, encoding);
457-
})
458-
459418
#ifdef _WIN32
460419
NODE_EXTERN v8::Local<v8::Value> WinapiErrnoException(
461420
v8::Isolate* isolate,
462421
int errorno,
463422
const char* syscall = nullptr,
464423
const char* msg = "",
465424
const char* path = nullptr);
466-
467-
NODE_DEPRECATED("Use WinapiErrnoException(isolate, ...)",
468-
inline v8::Local<v8::Value> WinapiErrnoException(int errorno,
469-
const char* syscall = nullptr, const char* msg = "",
470-
const char* path = nullptr) {
471-
return WinapiErrnoException(v8::Isolate::GetCurrent(),
472-
errorno,
473-
syscall,
474-
msg,
475-
path);
476-
})
477425
#endif
478426

479427
const char* signo_string(int errorno);

0 commit comments

Comments
 (0)