mirror of https://github.com/nodejs/node.git
src: initialize c-ares task list on env init
Don't forget to initialize the c-ares task tree head when creating a
new Environment. Oversight from the multi-context work that landed
in commit 756b622
.
Fixes #6244.
pull/5010/head
parent
d80d131c75
commit
a0f79867dc
|
@ -165,6 +165,7 @@ inline Environment::Environment(v8::Local<v8::Context> context)
|
|||
v8::HandleScope handle_scope(isolate());
|
||||
set_binding_cache_object(v8::Object::New());
|
||||
set_module_load_list_array(v8::Array::New());
|
||||
RB_INIT(&cares_task_list_);
|
||||
}
|
||||
|
||||
inline Environment::~Environment() {
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
// persons to whom the Software is furnished to do so, subject to the
|
||||
// following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
var common = require('../common');
|
||||
var dns = require('dns');
|
||||
|
||||
// Should not segfault, see #6244.
|
||||
dns.resolve4('127.0.0.1', common.mustCall(function() { }));
|
Loading…
Reference in New Issue