Skip to content

Commit

Permalink
Merge pull request #8812 from brave/pr8804_issues/15646_1.25.x
Browse files Browse the repository at this point in the history
don't use cached storage areas for ephemeral local storage (uplift to 1.25.x)
  • Loading branch information
kjozwiak authored May 18, 2021
2 parents 7feca8f + 58dbb4b commit a19d2c7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,11 @@ StorageArea* BraveDOMWindowStorage::ephemeralLocalStorage() {
if (!namespaces)
return nullptr;

auto storage_area =
namespaces->local_storage()->GetCachedArea(window->GetSecurityOrigin());
auto* controller = StorageController::GetInstance();
controller->ClearAreasIfNeeded();
auto storage_area = base::MakeRefCounted<CachedStorageArea>(
CachedStorageArea::AreaType::kSessionStorage, window->GetSecurityOrigin(),
controller->TaskRunner(), namespaces->local_storage());

// Ephemeral localStorage never persists stored data, which is also how
// sessionStorage works. Due to this, when opening up a new ephemeral
Expand Down

0 comments on commit a19d2c7

Please sign in to comment.