| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 297 |
| 298 /** | 298 /** |
| 299 * @constructor | 299 * @constructor |
| 300 * @extends {WebInspector.Object} | 300 * @extends {WebInspector.Object} |
| 301 * @param {?WebInspector.Target} target | 301 * @param {?WebInspector.Target} target |
| 302 * @param {!WebInspector.ProfileType} profileType | 302 * @param {!WebInspector.ProfileType} profileType |
| 303 * @param {string} title | 303 * @param {string} title |
| 304 */ | 304 */ |
| 305 WebInspector.ProfileHeader = function(target, profileType, title) | 305 WebInspector.ProfileHeader = function(target, profileType, title) |
| 306 { | 306 { |
| 307 this._targetObserver = new WebInspector.TargetObserver(target); | 307 this._weakTarget = target ? target.weakReference() : new WeakReference(null)
; |
| 308 this._profileType = profileType; | 308 this._profileType = profileType; |
| 309 this.title = title; | 309 this.title = title; |
| 310 this.uid = profileType._nextProfileUid++; | 310 this.uid = profileType._nextProfileUid++; |
| 311 this._fromFile = false; | 311 this._fromFile = false; |
| 312 } | 312 } |
| 313 | 313 |
| 314 /** | 314 /** |
| 315 * @constructor | 315 * @constructor |
| 316 * @param {?string} subtitle | 316 * @param {?string} subtitle |
| 317 * @param {boolean|undefined} wait | 317 * @param {boolean|undefined} wait |
| (...skipping 10 matching lines...) Expand all Loading... |
| 328 UpdateStatus: "UpdateStatus", | 328 UpdateStatus: "UpdateStatus", |
| 329 ProfileReceived: "ProfileReceived" | 329 ProfileReceived: "ProfileReceived" |
| 330 } | 330 } |
| 331 | 331 |
| 332 WebInspector.ProfileHeader.prototype = { | 332 WebInspector.ProfileHeader.prototype = { |
| 333 /** | 333 /** |
| 334 * @return {?WebInspector.Target} | 334 * @return {?WebInspector.Target} |
| 335 */ | 335 */ |
| 336 target: function() | 336 target: function() |
| 337 { | 337 { |
| 338 return this._targetObserver.target(); | 338 return this._weakTarget.get(); |
| 339 }, | 339 }, |
| 340 | 340 |
| 341 /** | 341 /** |
| 342 * @return {!WeakReference.<!WebInspector.Target>} |
| 343 */ |
| 344 weakTarget: function() |
| 345 { |
| 346 return this._weakTarget; |
| 347 }, |
| 348 |
| 349 /** |
| 342 * @return {!WebInspector.ProfileType} | 350 * @return {!WebInspector.ProfileType} |
| 343 */ | 351 */ |
| 344 profileType: function() | 352 profileType: function() |
| 345 { | 353 { |
| 346 return this._profileType; | 354 return this._profileType; |
| 347 }, | 355 }, |
| 348 | 356 |
| 349 /** | 357 /** |
| 350 * @param {?string} subtitle | 358 * @param {?string} subtitle |
| 351 * @param {boolean=} wait | 359 * @param {boolean=} wait |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 importScript("HeapSnapshotCommon.js"); | 1363 importScript("HeapSnapshotCommon.js"); |
| 1356 importScript("HeapSnapshotProxy.js"); | 1364 importScript("HeapSnapshotProxy.js"); |
| 1357 importScript("HeapSnapshotDataGrids.js"); | 1365 importScript("HeapSnapshotDataGrids.js"); |
| 1358 importScript("HeapSnapshotGridNodes.js"); | 1366 importScript("HeapSnapshotGridNodes.js"); |
| 1359 importScript("HeapSnapshotView.js"); | 1367 importScript("HeapSnapshotView.js"); |
| 1360 importScript("ProfileLauncherView.js"); | 1368 importScript("ProfileLauncherView.js"); |
| 1361 importScript("CanvasProfileView.js"); | 1369 importScript("CanvasProfileView.js"); |
| 1362 importScript("CanvasReplayStateView.js"); | 1370 importScript("CanvasReplayStateView.js"); |
| 1363 | 1371 |
| 1364 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry
(); | 1372 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry
(); |
| OLD | NEW |