| 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 8584146e9adde85269afce1f0f82c35579337414..ae2c531e1e8e67949c754d4bcc0ec26f921af7fa 100644
|
| --- a/Source/devtools/front_end/sdk/RemoteObject.js
|
| +++ b/Source/devtools/front_end/sdk/RemoteObject.js
|
| @@ -86,7 +86,7 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {function(this:Object, ...)} functionDeclaration
|
| + * @param {function(this:Object, ...)|!String} functionDeclaration
|
| * @param {!Array.<!RuntimeAgent.CallArgument>=} args
|
| * @param {function(?WebInspector.RemoteObject, boolean=)=} callback
|
| */
|
| @@ -96,7 +96,7 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {function(this:Object)} functionDeclaration
|
| + * @param {function(this:Object)|!String} functionDeclaration
|
| * @param {!Array.<!RuntimeAgent.CallArgument>|undefined} args
|
| * @param {function(*)} callback
|
| */
|
| @@ -132,7 +132,13 @@ WebInspector.RemoteObject.prototype = {
|
| functionDetails: function(callback)
|
| {
|
| callback(null);
|
| - }
|
| + },
|
| +
|
| + /** @return {string|undefined} */
|
| + get language()
|
| + {
|
| + throw "Not implemented";
|
| + },
|
| }
|
|
|
| /**
|
| @@ -199,7 +205,7 @@ WebInspector.RemoteObject.toCallArgument = function(remoteObject)
|
| * @param {string=} description
|
| * @param {!RuntimeAgent.ObjectPreview=} preview
|
| */
|
| -WebInspector.RemoteObjectImpl = function(target, objectId, type, subtype, value, description, preview)
|
| +WebInspector.RemoteObjectImpl = function(target, objectId, type, subtype, value, description, preview, language)
|
| {
|
| WebInspector.RemoteObject.call(this);
|
|
|
| @@ -209,12 +215,15 @@ WebInspector.RemoteObjectImpl = function(target, objectId, type, subtype, value,
|
|
|
| this._type = type;
|
| this._subtype = subtype;
|
| + this._language = language;
|
| if (objectId) {
|
| // handle
|
| this._objectId = objectId;
|
| this._description = description;
|
| this._hasChildren = true;
|
| this._preview = preview;
|
| + if (value !== undefined)
|
| + this.value = value;
|
| } else {
|
| // Primitive or null object.
|
| console.assert(type !== "object" || value === null);
|
| @@ -265,6 +274,12 @@ WebInspector.RemoteObjectImpl.prototype = {
|
| return this._preview;
|
| },
|
|
|
| + /** @return {string|undefined} */
|
| + get language()
|
| + {
|
| + return this._language;
|
| + },
|
| +
|
| /**
|
| * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!WebInspector.RemoteObjectProperty>)} callback
|
| */
|
| @@ -293,17 +308,15 @@ WebInspector.RemoteObjectImpl.prototype = {
|
| * @suppressReceiverCheck
|
| * @this {Object}
|
| */
|
| - function remoteFunction(arrayStr)
|
| + function mycallback(error, result, wasThrown)
|
| {
|
| - var result = this;
|
| - var properties = JSON.parse(arrayStr);
|
| - for (var i = 0, n = properties.length; i < n; ++i)
|
| - result = result[properties[i]];
|
| - return result;
|
| + if (error)
|
| + callback(null, false);
|
| + else
|
| + callback(this.target().runtimeModel.createRemoteObject(result), wasThrown);
|
| }
|
|
|
| - var args = [{ value: JSON.stringify(propertyPath) }];
|
| - this.callFunction(remoteFunction, args, callback);
|
| + this._runtimeAgent.getProperty(this._objectId, propertyPath, mycallback.bind(this));
|
| },
|
|
|
| /**
|
| @@ -448,7 +461,7 @@ WebInspector.RemoteObjectImpl.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {function(this:Object, ...)} functionDeclaration
|
| + * @param {function(this:Object, ...)|!String} functionDeclaration
|
| * @param {!Array.<!RuntimeAgent.CallArgument>=} args
|
| * @param {function(?WebInspector.RemoteObject, boolean=)=} callback
|
| */
|
| @@ -474,7 +487,7 @@ WebInspector.RemoteObjectImpl.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {function(this:Object)} functionDeclaration
|
| + * @param {function(this:Object)|!String} functionDeclaration
|
| * @param {!Array.<!RuntimeAgent.CallArgument>|undefined} args
|
| * @param {function(*)} callback
|
| */
|
| @@ -925,7 +938,7 @@ WebInspector.LocalJSONObject.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {function(this:Object, ...)} functionDeclaration
|
| + * @param {function(this:Object, ...)|!String} functionDeclaration
|
| * @param {!Array.<!RuntimeAgent.CallArgument>=} args
|
| * @param {function(?WebInspector.RemoteObject, boolean=)=} callback
|
| */
|
| @@ -948,7 +961,7 @@ WebInspector.LocalJSONObject.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {function(this:Object)} functionDeclaration
|
| + * @param {function(this:Object)|!String} functionDeclaration
|
| * @param {!Array.<!RuntimeAgent.CallArgument>|undefined} args
|
| * @param {function(*)} callback
|
| */
|
|
|