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

Side by Side Diff: Source/devtools/front_end/profiler/HeapSnapshotProxy.js

Issue 459833002: Revert of Revert of DevTools: Introduce module initializers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/network/module.json ('k') | Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698