File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 22#include < string>
33#include " env-inl.h"
44#include " inspector/protocol_helper.h"
5+ #include " node_url.h"
56#include " util-inl.h"
67#include " v8-isolate.h"
78#include " v8-local-handle.h"
@@ -20,16 +21,10 @@ void StorageAgent::Wire(protocol::UberDispatcher* dispatcher) {
2021DispatchResponse StorageAgent::getStorageKey (
2122 std::optional<protocol::String> frameId, protocol::String* storageKey) {
2223 auto local_storage_file = env_->options ()->localstorage_file ;
23- *storageKey = to_file_url (local_storage_file);
24+ *storageKey = node::url::FromFilePath (local_storage_file);
2425 return protocol::DispatchResponse::Success ();
2526}
2627
27- std::string StorageAgent::to_file_url (const std::filesystem::path& input) {
28- std::filesystem::path abs =
29- std::filesystem::weakly_canonical (std::filesystem::absolute (input));
30- return " file://" + abs.generic_string ();
31- }
32-
3328} // namespace protocol
3429} // namespace inspector
3530} // namespace node
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ class StorageAgent : public protocol::Storage::Backend {
2626 private:
2727 std::unique_ptr<protocol::Storage::Frontend> frontend_;
2828 Environment* env_;
29- std::string to_file_url (const std::filesystem::path& input);
3029};
3130} // namespace protocol
3231} // namespace inspector
You can’t perform that action at this time.
0 commit comments