Repository navigation
Conversation
|
Review requested:
|
|
Caution AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context. |
|
I used agent to resolve the problem. I confirm I revied code myself. |
|
FYI I posted a draft PR around the same time this one went up: #65832 A few things from it may be worth folding in here:
|
|
Thanks, this was useful. I went through all four against the source and pushed bf0648c.
One more from your diff that was not in your list: The one place I kept my version is the unparseable On the two PRs: yours was the more complete one, and most of what is now here came from it. If you would rather land yours, say so and I will close this in its favour. Otherwise I believe this one now covers the same ground. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65831 +/- ##
==========================================
+ Coverage 90.17% 90.18% +0.01%
==========================================
Files 770 770
Lines 264483 264492 +9
Branches 50262 50266 +4
==========================================
+ Hits 238491 238544 +53
+ Misses 16981 16938 -43
+ Partials 9011 9010 -1
🚀 New features to boost your workflow:
|
|
Hey @geeksilva97 @jasnell, please take a look when you have time |
could you rebase this PR? |
backup() only checked that sourceDb was an object before unwrapping it, so passing a plain object, an array, a Statement or a Session crashed the process. Check it against the Database constructor template instead, and keep that template behind Database::GetConstructorTemplate() like Statement, Session and SQLTagStore already do. Also let an exception thrown by an href getter propagate from ValidateDatabasePath() instead of replacing it with ERR_INVALID_ARG_TYPE. Fixes: nodejs#65830 Co-authored-by: Trevor Burnham <trevorburnham@gmail.com> Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com> Assisted-by: Claude Code
bf0648c to
89dd4fb
Compare
backup()checked only that its first argument was an object before unwrapping it as aDatabase, sobackup({}, path)crashed with a segfault. It now checks the argument against theDatabaseconstructor template and throwsERR_INVALID_ARG_TYPEinstead. The template now lives behindDatabase::GetConstructorTemplate(), likeStatement,SessionandSQLTagStore.ValidateDatabasePath()also lets an exception thrown by anhrefgetter propagate instead of replacing it withERR_INVALID_ARG_TYPE.The duck-typed URL crash from the original version of this PR was fixed separately in 25b205b, so this rebase drops that part.
Fixes: #65830