Commit 96882e1
src: fix handle leak in Buffer::New()
Fix handle leaks in Buffer::New() and Buffer::Copy() by creating the
handle scope before looking up the env with Environment::GetCurrent().
Environment::GetCurrent() calls v8::Isolate::GetCurrentContext(), which
creates a handle in the current scope, i.e., the scope created by the
caller of Buffer::New() or Buffer::Copy().
PR-URL: #7711
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>1 parent 9847f84 commit 96882e1Copy full SHA for 96882e1
File tree
Expand file treeCollapse file tree
1 file changed
+3
-3
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
1 file changed
+3
-3
lines changedOpen diff view settings
Collapse file
+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
320 | 320 | |
321 | 321 | |
322 | 322 | |
| 323 | + |
323 | 324 | |
324 | | - |
325 | 325 | |
326 | 326 | |
327 | 327 | |
| ||
370 | 370 | |
371 | 371 | |
372 | 372 | |
| 373 | + |
373 | 374 | |
374 | | - |
375 | 375 | |
376 | 376 | |
377 | 377 | |
| ||
409 | 409 | |
410 | 410 | |
411 | 411 | |
| 412 | + |
412 | 413 | |
413 | | - |
414 | 414 | |
415 | 415 | |
416 | 416 | |
|
0 commit comments