fs: throw more synchronous errors in JS land#19041
Closed
joyeecheung wants to merge 7 commits intonodejs:masterfrom
Closed
fs: throw more synchronous errors in JS land#19041joyeecheung wants to merge 7 commits intonodejs:masterfrom
joyeecheung wants to merge 7 commits intonodejs:masterfrom
Conversation
Member
Author
targos
approved these changes
Feb 27, 2018
| size_t len; | ||
| int64_t pos; | ||
| const int argc = args.Length(); | ||
| CHECK_GE(argc, 4); |
jasnell
approved these changes
Feb 28, 2018
XadillaX
approved these changes
Mar 2, 2018
Member
Author
|
Landed in 7cadb57...f7e5b38 with @targos 's comment addressed. Thanks! |
joyeecheung
added a commit
that referenced
this pull request
Mar 2, 2018
PR-URL: #19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
joyeecheung
added a commit
that referenced
this pull request
Mar 2, 2018
PR-URL: #19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
joyeecheung
added a commit
that referenced
this pull request
Mar 2, 2018
PR-URL: #19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
joyeecheung
added a commit
that referenced
this pull request
Mar 2, 2018
PR-URL: #19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
joyeecheung
added a commit
that referenced
this pull request
Mar 2, 2018
PR-URL: #19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
joyeecheung
added a commit
that referenced
this pull request
Mar 2, 2018
PR-URL: #19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
joyeecheung
added a commit
that referenced
this pull request
Mar 2, 2018
PR-URL: #19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Member
|
This PR landed with a full red Windows CI and has broken master. Should we revert or is it something simple to fix? |
Member
Author
|
@joaocgreis The windows CI seems to be broken by this Not sure how it is related to this PR... |
Member
|
@joyeecheung e.g., https://ci.nodejs.org/job/node-test-binary-windows/15333/COMPILED_BY=vs2017,RUNNER=win10,RUN_SUBSET=0/console Building addons
C:\Windows\SYSTEM32\cmd.exe[3240]: src\node_file.cc:1286: Assertion `(argc) == (7)' failed.
1: node::DecodeWrite
2: node::DecodeWrite
3: v8::internal::ParseInfo::character_stream
4: v8::internal::wasm::NativeModuleDeserializer::DeserializeFullBuffer
5: v8::internal::LocalEmbedderHeapTracer::RequiresImmediateWrapperProcessing
6: v8::internal::LocalEmbedderHeapTracer::RequiresImmediateWrapperProcessing
7: v8::internal::LocalEmbedderHeapTracer::RequiresImmediateWrapperProcessing
8: 000003FE44E04201 |
Member
Author
|
@richardlau Ah, so the I think I have found the culprit..fix coming up. |
joyeecheung
added a commit
to joyeecheung/node
that referenced
this pull request
Mar 3, 2018
The binding writeBuffer has been changed in nodejs#19041 and it now requires the last argument to be a context object. makeSyncWrite was not updated accordingly, resulting assertions on Windows. This patch fixes the usage of writeBuffer there.
3 tasks
Member
Author
|
Fix in #19103 |
joyeecheung
added a commit
that referenced
this pull request
Mar 3, 2018
The binding writeBuffer has been changed in #19041 and it now requires the last argument to be a context object. makeSyncWrite was not updated accordingly, resulting assertions on Windows. This patch fixes the usage of writeBuffer there. Also fix errors.uvException() so error.message are no longer enumerable, this fixes the deepStrictEqual assertion on the error object in test-stdout-close-catch. PR-URL: #19103 Refs: #19041 Reviewed-By: Anna Henningsen <anna@addaleax.net>
alexeykuzmin
added a commit
to electron/node
that referenced
this pull request
Apr 10, 2018
SYNC_REQ has been removed. See nodejs/node#18297 nodejs/node#19041
alexeykuzmin
added a commit
to electron/node
that referenced
this pull request
Apr 27, 2018
SYNC_REQ has been removed. See nodejs/node#18297 nodejs/node#19041
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
PR-URL: nodejs#19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
PR-URL: nodejs#19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
PR-URL: nodejs#19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
PR-URL: nodejs#19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
PR-URL: nodejs#19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
PR-URL: nodejs#19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
PR-URL: nodejs#19041 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
The binding writeBuffer has been changed in nodejs#19041 and it now requires the last argument to be a context object. makeSyncWrite was not updated accordingly, resulting assertions on Windows. This patch fixes the usage of writeBuffer there. Also fix errors.uvException() so error.message are no longer enumerable, this fixes the deepStrictEqual assertion on the error object in test-stdout-close-catch. PR-URL: nodejs#19103 Refs: nodejs#19041 Reviewed-By: Anna Henningsen <anna@addaleax.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
fs
After this PR, all synchronous errors in node_file.cc are migrated into JS land, and they all have error tests in
test-fs-error-messages.js(the asynchronous errors are tested as well).The only synchronous errors left in
fsis being fixed in #17851