| Index: third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js b/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js
|
| index 6ded00decb77399a3d41d5b0fa0aee01c3acdcd1..fe1ff3e18ff5fed3ee5c7f37b2927d70d0adab02 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js
|
| @@ -133,10 +133,10 @@ Profiler.HeapSnapshotGridNode = class extends DataGrid.DataGridNode {
|
|
|
| /**
|
| * @param {!SDK.Target} target
|
| - * @param {function(!SDK.RemoteObject)} callback
|
| * @param {string} objectGroupName
|
| + * @return {!Promise<!SDK.RemoteObject>}
|
| */
|
| - queryObjectContent(target, callback, objectGroupName) {
|
| + queryObjectContent(target, objectGroupName) {
|
| }
|
|
|
| /**
|
| @@ -605,15 +605,18 @@ Profiler.HeapSnapshotGenericObjectNode = class extends Profiler.HeapSnapshotGrid
|
| /**
|
| * @override
|
| * @param {!SDK.Target} target
|
| - * @param {function(!SDK.RemoteObject)} callback
|
| * @param {string} objectGroupName
|
| + * @return {!Promise<!SDK.RemoteObject>}
|
| */
|
| - queryObjectContent(target, callback, objectGroupName) {
|
| + queryObjectContent(target, objectGroupName) {
|
| + var fulfill;
|
| + var promise = new Promise(x => fulfill = x);
|
| +
|
| /**
|
| * @param {?SDK.RemoteObject} object
|
| */
|
| function onResult(object) {
|
| - callback(
|
| + fulfill(
|
| object ||
|
| target.runtimeModel.createRemoteObjectFromPrimitiveValue(Common.UIString('Preview is not available')));
|
| }
|
| @@ -625,6 +628,7 @@ Profiler.HeapSnapshotGenericObjectNode = class extends Profiler.HeapSnapshotGrid
|
| onResult(null);
|
| else
|
| heapProfilerModel.objectForSnapshotObjectId(String(this.snapshotNodeId), objectGroupName).then(onResult);
|
| + return promise;
|
| }
|
|
|
| updateHasChildren() {
|
|
|