Reviewed by Brady.
[WebKit-https.git] / WebCore / storage / DatabaseTracker.cpp
index 21906d954c1ab7fad4b589e41f16890c28c1dc34..ee29eca5b85921bcd536d2d0cc413db22099ad8f 100644 (file)
@@ -274,9 +274,10 @@ void DatabaseTracker::populateOrigins()
         return;
 
     int result;
-    RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromIdentifier(statement.getColumnText16(0));
-    while ((result = statement.step()) == SQLResultRow)
+    while ((result = statement.step()) == SQLResultRow) {
+        RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromIdentifier(statement.getColumnText16(0));
         m_originQuotaMap->set(origin.get(), statement.getColumnInt64(1));
+    }
 
     if (result != SQLResultDone)
         LOG_ERROR("Failed to read in all origins from the database");