OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyrightdd | 8 * * Redistributions of source code must retain the above copyrightdd |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 22 matching lines...) Expand all Loading... |
33 * @param {function(string, *)} eventHandler | 33 * @param {function(string, *)} eventHandler |
34 * @extends {WebInspector.Object} | 34 * @extends {WebInspector.Object} |
35 */ | 35 */ |
36 WebInspector.HeapSnapshotWorkerProxy = function(eventHandler) | 36 WebInspector.HeapSnapshotWorkerProxy = function(eventHandler) |
37 { | 37 { |
38 this._eventHandler = eventHandler; | 38 this._eventHandler = eventHandler; |
39 this._nextObjectId = 1; | 39 this._nextObjectId = 1; |
40 this._nextCallId = 1; | 40 this._nextCallId = 1; |
41 this._callbacks = []; | 41 this._callbacks = []; |
42 this._previousCallbacks = []; | 42 this._previousCallbacks = []; |
43 this._worker = new Worker("heap_snapshot_worker/HeapSnapshotWorker.js"); | 43 this._worker = Runtime.startWorker("heap_snapshot_worker"); |
44 this._worker.onmessage = this._messageReceived.bind(this); | 44 this._worker.onmessage = this._messageReceived.bind(this); |
45 } | 45 } |
46 | 46 |
47 WebInspector.HeapSnapshotWorkerProxy.prototype = { | 47 WebInspector.HeapSnapshotWorkerProxy.prototype = { |
48 /** | 48 /** |
49 * @param {number} profileUid | 49 * @param {number} profileUid |
50 * @param {function(!WebInspector.HeapSnapshotProxy)} snapshotReceivedCallba
ck | 50 * @param {function(!WebInspector.HeapSnapshotProxy)} snapshotReceivedCallba
ck |
51 * @return {!WebInspector.HeapSnapshotLoaderProxy} | 51 * @return {!WebInspector.HeapSnapshotLoaderProxy} |
52 */ | 52 */ |
53 createLoader: function(profileUid, snapshotReceivedCallback) | 53 createLoader: function(profileUid, snapshotReceivedCallback) |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 * @param {!WebInspector.HeapSnapshotCommon.ComparatorConfig} comparator | 527 * @param {!WebInspector.HeapSnapshotCommon.ComparatorConfig} comparator |
528 * @param {function()} callback | 528 * @param {function()} callback |
529 */ | 529 */ |
530 sortAndRewind: function(comparator, callback) | 530 sortAndRewind: function(comparator, callback) |
531 { | 531 { |
532 this.callMethod(callback, "sortAndRewind", comparator); | 532 this.callMethod(callback, "sortAndRewind", comparator); |
533 }, | 533 }, |
534 | 534 |
535 __proto__: WebInspector.HeapSnapshotProxyObject.prototype | 535 __proto__: WebInspector.HeapSnapshotProxyObject.prototype |
536 } | 536 } |
OLD | NEW |