Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5694)

Unified Diff: chrome/test/pyautolib/remote_inspector_client.py

Issue 27018002: Remove usages of HeapProfiler.finishHeapSnapshot from pyautolib (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/remote_inspector_client.py
diff --git a/chrome/test/pyautolib/remote_inspector_client.py b/chrome/test/pyautolib/remote_inspector_client.py
index ca70bb2386f0fb2e200f423a162d98249e90fff9..95b9cf6dbd4f897bb816920c3b047a86a2fbb822 100755
--- a/chrome/test/pyautolib/remote_inspector_client.py
+++ b/chrome/test/pyautolib/remote_inspector_client.py
@@ -851,17 +851,7 @@ class RemoteInspectorClient(object):
reply_dict['id'])
if 'frameTree' in reply_dict['result']:
self._url = reply_dict['result']['frameTree']['frame']['url']
- elif 'method' in reply_dict:
- # This is an auxiliary message sent from the remote Chrome instance.
- if reply_dict['method'] == self._agent_name + '.addProfileHeader':
- snapshot_req = (
- self._remote_inspector_thread.GetFirstUnfulfilledRequest(
- self._agent_name + '.takeHeapSnapshot'))
- if snapshot_req:
- snapshot_req.results['uid'] = reply_dict['params']['header']['uid']
- elif reply_dict['method'] == self._agent_name + '.addHeapSnapshotChunk':
- self._current_heap_snapshot.append(reply_dict['params']['chunk'])
- elif reply_dict['method'] == self._agent_name + '.finishHeapSnapshot':
+ elif request.method == self._agent_name + '.getHeapSnapshot':
# A heap snapshot has been completed. Analyze and output the data.
self._logger.debug('Heap snapshot taken: %s', self._url)
# TODO(dennisjeffrey): Parse the heap snapshot on-the-fly as the data
@@ -888,6 +878,16 @@ class RemoteInspectorClient(object):
done_condition.acquire()
done_condition.notify()
done_condition.release()
+ elif 'method' in reply_dict:
+ # This is an auxiliary message sent from the remote Chrome instance.
+ if reply_dict['method'] == self._agent_name + '.addProfileHeader':
+ snapshot_req = (
+ self._remote_inspector_thread.GetFirstUnfulfilledRequest(
+ self._agent_name + '.takeHeapSnapshot'))
+ if snapshot_req:
+ snapshot_req.results['uid'] = reply_dict['params']['header']['uid']
+ elif reply_dict['method'] == self._agent_name + '.addHeapSnapshotChunk':
+ self._current_heap_snapshot.append(reply_dict['params']['chunk'])
# Tell the remote inspector to take a v8 heap snapshot, then wait until
# the snapshot information is available to return.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698