Fixes the bug where the profile was not added when finished.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2008 09:01:42 +0000 (09:01 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2008 09:01:42 +0000 (09:01 +0000)
<rdar://problem/5958851> Stop Profiling from the Develop menu does
not add the Profile to the Inspector

Reviewed by Adam Roben.

* page/InspectorController.cpp:
(WebCore::InspectorController::stopUserInitiatedProfiling): Call
addProfile with the result of stopProfiling.

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

WebCore/ChangeLog
WebCore/page/InspectorController.cpp

index 31da6ee..a7c1a69 100644 (file)
@@ -1,5 +1,18 @@
 2008-05-23  Timothy Hatcher  <timothy@apple.com>
 
 2008-05-23  Timothy Hatcher  <timothy@apple.com>
 
+        Fixes the bug where the profile was not added when finished.
+
+        <rdar://problem/5958851> Stop Profiling from the Develop menu does
+        not add the Profile to the Inspector
+
+        Reviewed by Adam Roben.
+
+        * page/InspectorController.cpp:
+        (WebCore::InspectorController::stopUserInitiatedProfiling): Call
+        addProfile with the result of stopProfiling.
+
+2008-05-23  Timothy Hatcher  <timothy@apple.com>
+
         Tweak the Web Insector toolbar look to be smaller when attached to
         the inspected page.
 
         Tweak the Web Insector toolbar look to be smaller when attached to
         the inspected page.
 
index 8dfde38..56165c8 100644 (file)
@@ -1430,7 +1430,9 @@ void InspectorController::stopUserInitiatedProfiling()
     m_recordingUserInitiatedProfile = false;
 
     ExecState* exec = toJSDOMWindow(m_inspectedPage->mainFrame())->globalExec();
     m_recordingUserInitiatedProfile = false;
 
     ExecState* exec = toJSDOMWindow(m_inspectedPage->mainFrame())->globalExec();
-    Profiler::profiler()->stopProfiling(exec, UserInitiatedProfileName);
+    RefPtr<Profile> profile = Profiler::profiler()->stopProfiling(exec, UserInitiatedProfileName);
+    if (profile)
+        addProfile(profile);
 }
 
 static void addHeaders(JSContextRef context, JSObjectRef object, const HTTPHeaderMap& headers, JSValueRef* exception)
 }
 
 static void addHeaders(JSContextRef context, JSObjectRef object, const HTTPHeaderMap& headers, JSValueRef* exception)