2008-03-25 Kevin McCullough <kmccullough@apple.com>
authorkmccullough@apple.com <kmccullough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Mar 2008 23:43:29 +0000 (23:43 +0000)
committerkmccullough@apple.com <kmccullough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Mar 2008 23:43:29 +0000 (23:43 +0000)
        Reviewed by Adam.

        - Cleaned up the needless use of RefPtrs, which we may someday no longer use for
        InspectorResources.

        * page/InspectorController.cpp:
        (WebCore::InspectorController::didFinishLoading):
        (WebCore::InspectorController::didFailLoading):

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

WebCore/ChangeLog
WebCore/page/InspectorController.cpp

index 0582b5a..f7b7221 100644 (file)
@@ -2,6 +2,17 @@
 
         Reviewed by Adam.
 
+        - Cleaned up the needless use of RefPtrs, which we may someday no longer use for
+        InspectorResources.
+
+        * page/InspectorController.cpp:
+        (WebCore::InspectorController::didFinishLoading):
+        (WebCore::InspectorController::didFailLoading):
+
+2008-03-25  Kevin McCullough  <kmccullough@apple.com>
+
+        Reviewed by Adam.
+
         - Added a null check
 
         * xml/XMLHttpRequest.cpp: Null check
index 6ca556a..c188a9c 100644 (file)
@@ -1574,20 +1574,20 @@ void InspectorController::didFinishLoading(DocumentLoader* loader, unsigned long
     if (!enabled())
         return;
 
-    RefPtr<InspectorResource> resource = m_resources.get(identifier);
+    InspectorResource* resource = m_resources.get(identifier).get();
     if (!resource)
         return;
 
-    removeResource(resource.get());
+    removeResource(resource);
 
     resource->finished = true;
     resource->endTime = currentTime();
 
-    addResource(resource.get());
+    addResource(resource);
 
     if (windowVisible() && resource->scriptObject) {
-        updateScriptResource(resource.get(), resource->startTime, resource->responseReceivedTime, resource->endTime);
-        updateScriptResource(resource.get(), resource->finished);
+        updateScriptResource(resource, resource->startTime, resource->responseReceivedTime, resource->endTime);
+        updateScriptResource(resource, resource->finished);
     }
 }
 
@@ -1596,21 +1596,21 @@ void InspectorController::didFailLoading(DocumentLoader* loader, unsigned long i
     if (!enabled())
         return;
 
-    RefPtr<InspectorResource> resource = m_resources.get(identifier);
+    InspectorResource* resource = m_resources.get(identifier).get();
     if (!resource)
         return;
 
-    removeResource(resource.get());
+    removeResource(resource);
 
     resource->finished = true;
     resource->failed = true;
     resource->endTime = currentTime();
 
-    addResource(resource.get());
+    addResource(resource);
 
     if (windowVisible() && resource->scriptObject) {
-        updateScriptResource(resource.get(), resource->startTime, resource->responseReceivedTime, resource->endTime);
-        updateScriptResource(resource.get(), resource->finished, resource->failed);
+        updateScriptResource(resource, resource->startTime, resource->responseReceivedTime, resource->endTime);
+        updateScriptResource(resource, resource->finished, resource->failed);
     }
 }