File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -88,14 +88,14 @@ protocol::DispatchResponse DOMStorageAgent::getDOMStorageItems(
8888 " DOMStorage domain is not enabled" );
8989 }
9090 bool is_local_storage = storageId->getIsLocalStorage ();
91- std::optional< StorageMap> storage_map =
92- is_local_storage ? std::make_optional<StorageMap>( local_storage_map_)
93- : std::make_optional <StorageMap>(session_storage_map_) ;
91+ const StorageMap* storage_map =
92+ is_local_storage ? & local_storage_map_ : &session_storage_map_;
93+ std::optional <StorageMap> storage_map_fallback ;
9494 if (storage_map->empty ()) {
9595 auto web_storage_obj = getWebStorage (is_local_storage);
9696 if (web_storage_obj) {
97- StorageMap all_items = web_storage_obj.value ()->GetAll ();
98- storage_map = std::make_optional<StorageMap>( std::move (all_items) );
97+ storage_map_fallback = web_storage_obj.value ()->GetAll ();
98+ storage_map = &storage_map_fallback. value ( );
9999 }
100100 }
101101
You can’t perform that action at this time.
0 commit comments