inspector: auto collect webstorage data#62145
Conversation
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62145 +/- ##
==========================================
+ Coverage 89.64% 89.69% +0.04%
==========================================
Files 676 677 +1
Lines 206240 206650 +410
Branches 39514 39568 +54
==========================================
+ Hits 184891 185349 +458
+ Misses 13465 13422 -43
+ Partials 7884 7879 -5
🚀 New features to boost your workflow:
|
addaleax
left a comment
There was a problem hiding this comment.
Looks good!
I'd still recommend adding a test for UTF-16 characters outside the ISO-8859-1 range (e.g. emoji or Chinese characters)
Failed to start CI- Validating Jenkins credentials ✔ Jenkins credentials valid - Starting PR CI job ✘ Failed to start PR CI: 404 Not Foundhttps://github.com/nodejs/node/actions/runs/22820941170 |
|
Related test failure: You probably need to skip that test when compiled without SQLite |
8e0c41b to
b278ecc
Compare
|
I changed the implementation to handle the storage keys and values as UTF-16. |
b278ecc to
8fc09a7
Compare
src/inspector/dom_storage_agent.cc
Outdated
| is_local_storage ? local_storage_map_ : session_storage_map_; | ||
| std::optional<StorageMap> storage_map = | ||
| is_local_storage ? std::make_optional<StorageMap>(local_storage_map_) | ||
| : std::make_optional<StorageMap>(session_storage_map_); |
There was a problem hiding this comment.
This is still making full copies – that's proably fine for a inspector feature, but it's an unnecessary set of extra allocations
295a5a4 to
37e22ff
Compare
|
@addaleax |
Web Storage data collection, which previously required explicitly firing events to send data to DevTools, is now performed automatically within Node.js.
Web Storage will appear in DevTools simply by specifying
--experimental-storage-inspection, without requiring any code changes.This feature relies on the changes introduced in the following change request, so it can be verified with the latest DevTools commit:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7274801