Remove unneeded variable in LocalStorageNamespace::getOrCreateStorageArea
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jul 2019 20:08:04 +0000 (20:08 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jul 2019 20:08:04 +0000 (20:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199477

Reviewed by Alex Christensen.

* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@247394 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/WebStorage/StorageManager.cpp

index 4c0c3f1..95095c8 100644 (file)
@@ -1,3 +1,13 @@
+2019-07-12  Youenn Fablet  <youenn@apple.com>
+
+        Remove unneeded variable in LocalStorageNamespace::getOrCreateStorageArea
+        https://bugs.webkit.org/show_bug.cgi?id=199477
+
+        Reviewed by Alex Christensen.
+
+        * NetworkProcess/WebStorage/StorageManager.cpp:
+        (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
+
 2019-07-12  Pawel Stanek  <p.stanek@metrological.com>
 
         Connection::waitForSyncReply() uses wall time clock for timeout
index 34a031e..5e8f929 100644 (file)
@@ -356,10 +356,8 @@ StorageManager::LocalStorageNamespace::~LocalStorageNamespace()
 
 auto StorageManager::LocalStorageNamespace::getOrCreateStorageArea(SecurityOriginData&& securityOrigin, IsEphemeral isEphemeral) -> Ref<StorageArea>
 {
-    RefPtr<StorageArea> protectedStorageArea;
     return *m_storageAreaMap.ensure(securityOrigin, [&]() mutable {
-        protectedStorageArea = StorageArea::create(isEphemeral == IsEphemeral::Yes ? nullptr : this, WTFMove(securityOrigin), m_quotaInBytes);
-        return protectedStorageArea.get();
+        return StorageArea::create(isEphemeral == IsEphemeral::Yes ? nullptr : this, WTFMove(securityOrigin), m_quotaInBytes);
     }).iterator->value;
 }