Commit b2e85a2f authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[inspector] removed unused injected-script methods

TBR=dgozman@chromium.org

Bug: chromium:595206
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ibd55b6b2e375f53b527168995d0e89bd7a8109e4
Reviewed-on: https://chromium-review.googlesource.com/737531
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48894}
parent 343bf6f3
......@@ -219,21 +219,6 @@ InjectedScript.prototype = {
return this._wrapObject(object, groupName, forceValueType, generatePreview);
},
/**
* @param {!Array<!Object>} array
* @param {string} property
* @param {string} groupName
* @param {boolean} forceValueType
* @param {boolean} generatePreview
*/
wrapPropertyInArray: function(array, property, groupName, forceValueType, generatePreview)
{
for (var i = 0; i < array.length; ++i) {
if (typeof array[i] === "object" && property in array[i])
array[i][property] = this.wrapObject(array[i][property], groupName, forceValueType, generatePreview);
}
},
/**
* @param {!Object} table
* @param {!Array.<string>|string|boolean} columns
......
......@@ -390,43 +390,6 @@ Response InjectedScript::wrapObject(
return Response::OK();
}
Response InjectedScript::wrapObjectProperty(v8::Local<v8::Object> object,
v8::Local<v8::Name> key,
const String16& groupName,
bool forceValueType,
bool generatePreview) const {
v8::Local<v8::Value> property;
v8::Local<v8::Context> context = m_context->context();
if (!object->Get(context, key).ToLocal(&property))
return Response::InternalError();
v8::Local<v8::Value> wrappedProperty;
Response response = wrapValue(property, groupName, forceValueType,
generatePreview, &wrappedProperty);
if (!response.isSuccess()) return response;
v8::Maybe<bool> success =
createDataProperty(context, object, key, wrappedProperty);
if (success.IsNothing() || !success.FromJust())
return Response::InternalError();
return Response::OK();
}
Response InjectedScript::wrapPropertyInArray(v8::Local<v8::Array> array,
v8::Local<v8::String> property,
const String16& groupName,
bool forceValueType,
bool generatePreview) const {
V8FunctionCall function(m_context->inspector(), m_context->context(),
v8Value(), "wrapPropertyInArray");
function.appendArgument(array);
function.appendArgument(property);
function.appendArgument(groupName);
function.appendArgument(forceValueType);
function.appendArgument(generatePreview);
bool hadException = false;
function.call(hadException);
return hadException ? Response::InternalError() : Response::OK();
}
Response InjectedScript::wrapValue(v8::Local<v8::Value> value,
const String16& groupName,
bool forceValueType, bool generatePreview,
......
......@@ -85,15 +85,6 @@ class InjectedScript final {
v8::Local<v8::Value>, const String16& groupName, bool forceValueType,
bool generatePreview,
std::unique_ptr<protocol::Runtime::RemoteObject>* result) const;
Response wrapObjectProperty(v8::Local<v8::Object>, v8::Local<v8::Name> key,
const String16& groupName,
bool forceValueType = false,
bool generatePreview = false) const;
Response wrapPropertyInArray(v8::Local<v8::Array>,
v8::Local<v8::String> property,
const String16& groupName,
bool forceValueType = false,
bool generatePreview = false) const;
std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable(
v8::Local<v8::Value> table, v8::Local<v8::Value> columns) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment