refactor: add EmitDeprecationWarning helper (#46860)

* refactor: add EmitDeprecationWarning helper

Also switches EmitWarning to using Node's ProcessEmitWarningGeneric

* chore: use node namespace for function call
This commit is contained in:
David Sanders 2025-04-30 11:48:35 -07:00 committed by GitHub
commit 4f89c31956
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 34 additions and 19 deletions

View file

@ -286,9 +286,8 @@ v8::Local<v8::Value> NativeImage::GetBitmap(gin::Arguments* args) {
if (!deprecated_warning_issued) {
deprecated_warning_issued = true;
util::EmitWarning(isolate_,
"getBitmap() is deprecated, use toBitmap() instead.",
"DeprecationWarning");
util::EmitDeprecationWarning(
isolate_, "getBitmap() is deprecated, use toBitmap() instead.");
}
return ToBitmap(args);