Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/internal/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function callbackTrampoline(asyncId, cb, ...args) {
emitBeforeNative(asyncId);

let result;
if (typeof domain_cb === 'function') {
if (asyncId === 0 && typeof domain_cb === 'function') {
ArrayPrototypeUnshift(args, cb);
result = ReflectApply(domain_cb, this, args);
} else {
Expand Down
4 changes: 3 additions & 1 deletion test/parallel/test-domain-http-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
require('../common');
const common = require('../common');
const domain = require('domain');
const http = require('http');
const assert = require('assert');
const debug = require('util').debuglog('test');

process.on('warning', common.mustNotCall());

const objects = { foo: 'bar', baz: {}, num: 42, arr: [1, 2, 3] };
objects.baz.asdf = objects;

Expand Down
2 changes: 2 additions & 0 deletions test/parallel/test-domain-implicit-binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const domain = require('domain');
const fs = require('fs');
const isEnumerable = Function.call.bind(Object.prototype.propertyIsEnumerable);

process.on('warning', common.mustNotCall());

{
const d = new domain.Domain();

Expand Down
2 changes: 2 additions & 0 deletions test/parallel/test-domain-implicit-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const common = require('../common');
const assert = require('assert');
const domain = require('domain');

process.on('warning', common.mustNotCall());

const d = new domain.Domain();

d.on('error', common.mustCall(function(er) {
Expand Down
2 changes: 2 additions & 0 deletions test/parallel/test-domain-multi.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const common = require('../common');
const domain = require('domain');
const http = require('http');

process.on('warning', common.mustNotCall());

const a = domain.create();
a.enter(); // This will be our "root" domain

Expand Down
2 changes: 2 additions & 0 deletions test/parallel/test-domain-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const domain = require('domain');
const fs = require('fs');
const vm = require('vm');

process.on('warning', common.mustNotCall());

{
const d = domain.create();

Expand Down