Changeset 120456 in webkit
- Timestamp:
- Jun 15, 2012, 7:28:20 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/inspector/profiler/heap-snapshot-get-profile-crash-expected.txt (added)
-
LayoutTests/inspector/profiler/heap-snapshot-get-profile-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/inspector/InspectorProfilerAgent.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r120451 r120456 1 2012-06-15 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Web Inspector: CRASH: getProfile is crashing for unknown profiles. 4 https://bugs.webkit.org/show_bug.cgi?id=89202 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/profiler/heap-snapshot-get-profile-crash-expected.txt: Added. 9 * inspector/profiler/heap-snapshot-get-profile-crash.html: Added. 10 1 11 2012-06-15 Kent Tamura <tkent@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r120453 r120456 1 2012-06-15 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Web Inspector: CRASH: getProfile is crashing for unknown profiles. 4 https://bugs.webkit.org/show_bug.cgi?id=89202 5 6 agents' functions have to set a value to errorString if it can't assign values to the mandatory out arguments. 7 8 Reviewed by Pavel Feldman. 9 10 Test: inspector/profiler/heap-snapshot-get-profile-crash.html 11 12 * inspector/InspectorProfilerAgent.cpp: 13 (WebCore::InspectorProfilerAgent::getProfile): 14 1 15 2012-06-15 Max Feil <mfeil@rim.com> 2 16 -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp
r116768 r120456 268 268 } // namespace 269 269 270 void InspectorProfilerAgent::getProfile(ErrorString* , const String& type, int rawUid, RefPtr<TypeBuilder::Profiler::Profile>& profileObject)270 void InspectorProfilerAgent::getProfile(ErrorString* errorString, const String& type, int rawUid, RefPtr<TypeBuilder::Profiler::Profile>& profileObject) 271 271 { 272 272 unsigned uid = static_cast<unsigned>(rawUid); 273 273 if (type == CPUProfileType) { 274 274 ProfilesMap::iterator it = m_profiles.find(uid); 275 if (it != m_profiles.end()) { 276 profileObject = TypeBuilder::Profiler::Profile::create(); 277 profileObject->setHead(it->second->buildInspectorObjectForHead()); 278 if (it->second->bottomUpHead()) 279 profileObject->setBottomUpHead(it->second->buildInspectorObjectForBottomUpHead()); 275 if (it == m_profiles.end()) { 276 *errorString = "Profile wasn't found"; 277 return; 280 278 } 279 profileObject = TypeBuilder::Profiler::Profile::create(); 280 profileObject->setHead(it->second->buildInspectorObjectForHead()); 281 if (it->second->bottomUpHead()) 282 profileObject->setBottomUpHead(it->second->buildInspectorObjectForBottomUpHead()); 281 283 } else if (type == HeapProfileType) { 282 284 HeapSnapshotsMap::iterator it = m_snapshots.find(uid); 283 if (it != m_snapshots.end()) { 284 RefPtr<ScriptHeapSnapshot> snapshot = it->second; 285 profileObject = TypeBuilder::Profiler::Profile::create(); 286 if (m_frontend) { 287 OutputStream stream(m_frontend, uid); 288 snapshot->writeJSON(&stream); 289 } 285 if (it == m_snapshots.end()) { 286 *errorString = "Profile wasn't found"; 287 return; 288 } 289 RefPtr<ScriptHeapSnapshot> snapshot = it->second; 290 profileObject = TypeBuilder::Profiler::Profile::create(); 291 if (m_frontend) { 292 OutputStream stream(m_frontend, uid); 293 snapshot->writeJSON(&stream); 290 294 } 291 295 }
Note:
See TracChangeset
for help on using the changeset viewer.