mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
src: use DCHECK in AsyncWrap::MakeCallback instead emiting a warning
Replace emitting of a process warning by a DCHECK because the use after free in http parser is fixed now. Refs: https://github.com/nodejs/node/pull/61995#issuecomment-3980534771 Refs: https://github.com/nodejs/node/pull/62095 PR-URL: https://github.com/nodejs/node/pull/62795 Refs: https://github.com/nodejs/node/pull/62095 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
1 parent
94433e450f
commit
ef7ffce7cf
1 file changed
+2
-10
+2
-10
@@ -25,9 +25,6 @@
|
||||
#include "env-inl.h"
|
||||
#include "node_errors.h"
|
||||
#include "node_external_reference.h"
|
||||
#ifdef DEBUG
|
||||
#include <node_process-inl.h>
|
||||
#endif
|
||||
#include "tracing/traced_value.h"
|
||||
#include "util-inl.h"
|
||||
|
||||
@@ -677,13 +674,8 @@ MaybeLocal<Value> AsyncWrap::MakeCallback(const Local<Function> cb,
|
||||
Local<Value>* argv) {
|
||||
EmitTraceEventBefore();
|
||||
|
||||
#ifdef DEBUG
|
||||
if (context_frame().IsEmpty()) {
|
||||
ProcessEmitWarning(env(),
|
||||
"MakeCallback() called without context_frame, "
|
||||
"likely use after destroy of AsyncWrap.");
|
||||
}
|
||||
#endif
|
||||
// If this check fails it indicates an use after-free.
|
||||
DCHECK(!context_frame().IsEmpty());
|
||||
|
||||
ProviderType provider = provider_type();
|
||||
async_context context { get_async_id(), get_trigger_async_id() };
|
||||
|
||||
Reference in new issue
Block a user