refactor: add EmitDeprecationWarning helper (#46879)
* refactor: add EmitDeprecationWarning helper Also switches EmitWarning to using Node's ProcessEmitWarningGeneric Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: use node namespace for function call Co-authored-by: David Sanders <dsanders11@ucsbalum.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
parent
ee65ab75f5
commit
c24f330b45
5 changed files with 34 additions and 19 deletions
|
@ -666,10 +666,9 @@ void WebRequest::SetListener(Event event,
|
|||
}
|
||||
|
||||
if (filter_include_patterns.empty()) {
|
||||
util::EmitWarning(
|
||||
util::EmitDeprecationWarning(
|
||||
"The urls array in WebRequestFilter is empty, which is deprecated. "
|
||||
"Please use '<all_urls>' to match all URLs.",
|
||||
"DeprecationWarning");
|
||||
"Please use '<all_urls>' to match all URLs.");
|
||||
filter_include_patterns.insert("<all_urls>");
|
||||
}
|
||||
|
||||
|
|
|
@ -182,9 +182,8 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
|
|||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (windowType == "textured" && (transparent() || !has_frame())) {
|
||||
util::EmitWarning(
|
||||
"The 'textured' window type is deprecated and will be removed",
|
||||
"DeprecationWarning");
|
||||
util::EmitDeprecationWarning(
|
||||
"The 'textured' window type is deprecated and will be removed");
|
||||
styleMask |= NSWindowStyleMaskTexturedBackground;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue