Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugger: remove obsolete setTimeout #7154

Closed
wants to merge 4 commits into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented Jun 4, 2016

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

debugger

Description of change

Remove obsolete setTimeout() introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)

R=@indutny

@Trott Trott added the debugger label Jun 4, 2016
@indutny
Copy link
Member

indutny commented Jun 4, 2016

LGTM if CI is green

@Trott
Copy link
Member Author

Trott commented Jun 4, 2016

@Trott
Copy link
Member Author

Trott commented Jun 4, 2016

Alas, it fails on Windows. https://ci.nodejs.org/job/node-test-binary-windows/2425/

not ok 49 parallel/test-debugger-pid
# c:\workspace\node-test-binary-windows\RUN_SUBSET\2\VS_VERSION\vcbt2015\label\win10\Release\node.exe debug -p 655555
# 
# assert.js:90
#   throw new assert.AssertionError({
#   ^
# AssertionError: '(node:4000) There was an internal error in Node\'s debugger. Please report this bug.' === '_debugger.js:1670\r'
#     at ChildProcess.<anonymous> (C:\workspace\node-test-binary-windows\RUN_SUBSET\2\VS_VERSION\vcbt2015\label\win10\test\parallel\test-debugger-pid.js:49:10)
#     at emitOne (events.js:96:13)
#     at ChildProcess.emit (events.js:188:7)
#     at C:\workspace\node-test-binary-windows\RUN_SUBSET\2\VS_VERSION\vcbt2015\label\win10\test\parallel\test-debugger-pid.js:18:16
#     at Array.forEach (native)
#     at Socket.onData (C:\workspace\node-test-binary-windows\RUN_SUBSET\2\VS_VERSION\vcbt2015\label\win10\test\parallel\test-debugger-pid.js:17:8)
#     at emitOne (events.js:96:13)
#     at Socket.emit (events.js:188:7)
#     at readableAddChunk (_stream_readable.js:172:18)
#     at Socket.Readable.push (_stream_readable.js:130:10)
  ---
  duration_ms: 0.308

@Fishrock123
Copy link
Member

@Trott what happens if you use setImmediate()?

@Trott
Copy link
Member Author

Trott commented Jun 5, 2016

CI with change to setImmediate() instead of full timer elimination: https://ci.nodejs.org/job/node-test-pull-request/2924/

@Trott
Copy link
Member Author

Trott commented Jun 5, 2016

setImmediate() seems to be just fine on Windows. 🎉

@Trott
Copy link
Member Author

Trott commented Jun 5, 2016

Re-running CI again because all the ARM stuff blew up, wow: https://ci.nodejs.org/job/node-test-pull-request/2925/

@cjihrig
Copy link
Contributor

cjihrig commented Jun 5, 2016

LGTM. The CI blew up again though.

self.resume();
});
}, 10);
setImmediate(() => { self.run(function() { self.resume(); }); });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.run(self.resume)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also can you drop self for this now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also can you drop self for this now?

Oh, right, arrow functions, lexical binding...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.run(self.resume)?

test/parallel/test-debugger-util-regression.js fails if self.resume/this.resume is not wrapped in a function. (I did not look to see why...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably because of this not being set properly.

@Trott
Copy link
Member Author

Trott commented Jun 6, 2016

self.resume();
});
}, 10);
setImmediate(() => { this.run(() => { this.resume; }); });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're no longer calling resume()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, looks like we don't have a test that covers that. Guess I'll be adding one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trott added 4 commits June 6, 2016 14:11
Remove obsolete `setTimeout()` introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)
@Trott
Copy link
Member Author

Trott commented Jun 6, 2016

rebased, removed .resume() that was accidentally discovered to be unnecessary, force pushed...

@indutny @cjihrig Can you confirm that this still looks good to you (assuming CI doesn't have any surprises)?

CI: https://ci.nodejs.org/job/node-test-pull-request/2939/

@cjihrig
Copy link
Contributor

cjihrig commented Jun 7, 2016

LGTM, but I'll defer to @indutny, who appears to have written that code back in 2011 (3148f14).

@indutny
Copy link
Member

indutny commented Jun 7, 2016

Still LGTM

Trott added a commit to Trott/io.js that referenced this pull request Jun 7, 2016
Remove obsolete `setTimeout()` introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)

PR-URL: nodejs#7154
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Trott
Copy link
Member Author

Trott commented Jun 7, 2016

Landed in 671cffa

@Trott Trott closed this Jun 7, 2016
evanlucas pushed a commit that referenced this pull request Jun 15, 2016
Remove obsolete `setTimeout()` introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)

PR-URL: #7154
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@evanlucas evanlucas mentioned this pull request Jun 16, 2016
@MylesBorins
Copy link
Contributor

@Trott lts?

@Trott
Copy link
Member Author

Trott commented Jul 11, 2016

@thealphanerd I think so, but maybe check with @indutny ?

@indutny
Copy link
Member

indutny commented Jul 11, 2016

If CI is good - LGTM

MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
Remove obsolete `setTimeout()` introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)

PR-URL: #7154
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Remove obsolete `setTimeout()` introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)

PR-URL: #7154
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Remove obsolete `setTimeout()` introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)

PR-URL: #7154
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Remove obsolete `setTimeout()` introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)

PR-URL: #7154
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Remove obsolete `setTimeout()` introduced in 3148f14. The fix for the
problem is in b266074. (For the record, I mostly don't know what I'm
talking about here but am summarizing from an IRC #node-dev conversation
with @indutny on 04-Jun-2016.)

PR-URL: #7154
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Trott Trott deleted the fixhack branch January 13, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants