| Index: Source/devtools/front_end/sdk/RemoteObject.js
|
| diff --git a/Source/devtools/front_end/sdk/RemoteObject.js b/Source/devtools/front_end/sdk/RemoteObject.js
|
| index b465eb2d046a9c0b08290bebb3e0b603d9a68d70..199f8c58152ffea9eedc48c6a5e14214f22c61cd 100644
|
| --- a/Source/devtools/front_end/sdk/RemoteObject.js
|
| +++ b/Source/devtools/front_end/sdk/RemoteObject.js
|
| @@ -117,7 +117,7 @@ WebInspector.RemoteObject.prototype = {
|
|
|
| /**
|
| * @param {boolean} accessorPropertiesOnly
|
| - * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!WebInspector.RemoteObjectProperty>)} callback
|
| + * @param {function(?Array<!WebInspector.RemoteObjectProperty>, ?Array<!WebInspector.RemoteObjectProperty>)} callback
|
| */
|
| getAllProperties: function(accessorPropertiesOnly, callback)
|
| {
|
| @@ -125,6 +125,37 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| + * @param {boolean} accessorPropertiesOnly
|
| + * @return {!Promise<!{properties: ?Array<!WebInspector.RemoteObjectProperty>, internalProperties: ?Array<!WebInspector.RemoteObjectProperty>}>}
|
| + */
|
| + getAllPropertiesPromise: function(accessorPropertiesOnly)
|
| + {
|
| + return new Promise(promiseConstructor.bind(this));
|
| +
|
| + /**
|
| + * @param {function(!{properties: ?Array<!WebInspector.RemoteObjectProperty>, internalProperties: ?Array.<!WebInspector.RemoteObjectProperty>})} success
|
| + * @this {WebInspector.RemoteObject}
|
| + */
|
| + function promiseConstructor(success)
|
| + {
|
| + this.getAllProperties(accessorPropertiesOnly, getAllPropertiesCallback.bind(null, success));
|
| + }
|
| +
|
| + /**
|
| + * @param {function(!{properties: ?Array<!WebInspector.RemoteObjectProperty>, internalProperties: ?Array<!WebInspector.RemoteObjectProperty>})} callback
|
| + * @param {?Array<!WebInspector.RemoteObjectProperty>} properties
|
| + * @param {?Array<!WebInspector.RemoteObjectProperty>} internalProperties
|
| + */
|
| + function getAllPropertiesCallback(callback, properties, internalProperties)
|
| + {
|
| + callback({
|
| + properties: properties,
|
| + internalProperties: internalProperties
|
| + });
|
| + }
|
| + },
|
| +
|
| + /**
|
| * @return {!Promise<?Array<!WebInspector.EventListener>>}
|
| */
|
| eventListeners: function()
|
| @@ -185,7 +216,7 @@ WebInspector.RemoteObject.prototype = {
|
|
|
| /**
|
| * @param {function(this:Object)} functionDeclaration
|
| - * @param {!Array.<!RuntimeAgent.CallArgument>|undefined} args
|
| + * @param {!Array<!RuntimeAgent.CallArgument>|undefined} args
|
| * @param {function(*)} callback
|
| */
|
| callFunctionJSON: function(functionDeclaration, args, callback)
|
| @@ -194,6 +225,24 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| + * @param {function(this:Object)} functionDeclaration
|
| + * @param {!Array<!RuntimeAgent.CallArgument>|undefined} args
|
| + * @return {!Promise<*>}
|
| + */
|
| + callFunctionJSONPromise: function(functionDeclaration, args)
|
| + {
|
| + return new Promise(promiseConstructor.bind(this));
|
| +
|
| + /**
|
| + * @this {WebInspector.RemoteObject}
|
| + */
|
| + function promiseConstructor(success)
|
| + {
|
| + this.callFunctionJSON(functionDeclaration, args, success);
|
| + }
|
| + },
|
| +
|
| + /**
|
| * @return {!WebInspector.Target}
|
| */
|
| target: function()
|
| @@ -226,6 +275,23 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| + * @return {!Promise<?WebInspector.DebuggerModel.FunctionDetails>}
|
| + */
|
| + functionDetailsPromise: function()
|
| + {
|
| + return new Promise(promiseConstructor.bind(this));
|
| +
|
| + /**
|
| + * @param {function(?WebInspector.DebuggerModel.FunctionDetails)} success
|
| + * @this {WebInspector.RemoteObject}
|
| + */
|
| + function promiseConstructor(success)
|
| + {
|
| + this.functionDetails(success);
|
| + }
|
| + },
|
| +
|
| + /**
|
| * @param {function(?WebInspector.DebuggerModel.GeneratorObjectDetails)} callback
|
| */
|
| generatorObjectDetails: function(callback)
|
| @@ -234,7 +300,7 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {function(?Array.<!DebuggerAgent.CollectionEntry>)} callback
|
| + * @param {function(?Array<!DebuggerAgent.CollectionEntry>)} callback
|
| */
|
| collectionEntries: function(callback)
|
| {
|
|
|