Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43bf39c

Browse filesBrowse files
Flarnaaduh95
authored andcommitted
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: #61995 (comment) Refs: #62095 PR-URL: #62795 Refs: #62095 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent 32f2169 commit 43bf39c
Copy full SHA for 43bf39c

1 file changed

+2-10Lines changed: 2 additions & 10 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/async_wrap.cc‎

Copy file name to clipboardExpand all lines: src/async_wrap.cc
+2-10Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
#include "env-inl.h"
2626
#include "node_errors.h"
2727
#include "node_external_reference.h"
28-
#ifdef DEBUG
29-
#include <node_process-inl.h>
30-
#endif
3128
#include "tracing/traced_value.h"
3229
#include "util-inl.h"
3330

@@ -677,13 +674,8 @@ MaybeLocal<Value> AsyncWrap::MakeCallback(const Local<Function> cb,
677674
Local<Value>* argv) {
678675
EmitTraceEventBefore();
679676

680-
#ifdef DEBUG
681-
if (context_frame().IsEmpty()) {
682-
ProcessEmitWarning(env(),
683-
"MakeCallback() called without context_frame, "
684-
"likely use after destroy of AsyncWrap.");
685-
}
686-
#endif
677+
// If this check fails it indicates an use after-free.
678+
DCHECK(!context_frame().IsEmpty());
687679

688680
ProviderType provider = provider_type();
689681
async_context context { get_async_id(), get_trigger_async_id() };

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.