Commit 64d14553 authored by Eugene Ostroukhov's avatar Eugene Ostroukhov Committed by Commit Bot

[inspector] allow generatePreview for wrapObject

This method is needed by some Blink agents to generate object previews.

Bug: 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2304a6e44ea65ec469f3a3216b8bed789f706d0c
Reviewed-on: https://chromium-review.googlesource.com/821596Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50049}
parent 7b80915a
...@@ -151,6 +151,10 @@ class V8_EXPORT V8InspectorSession { ...@@ -151,6 +151,10 @@ class V8_EXPORT V8InspectorSession {
virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject( virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Context>, v8::Local<v8::Value>,
const StringView& groupName) = 0; const StringView& groupName) = 0;
virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
v8::Local<v8::Context>, v8::Local<v8::Value>, const StringView& groupName,
bool generatePreview) = 0;
virtual bool unwrapObject(std::unique_ptr<StringBuffer>* error, virtual bool unwrapObject(std::unique_ptr<StringBuffer>* error,
const StringView& objectId, v8::Local<v8::Value>*, const StringView& objectId, v8::Local<v8::Value>*,
v8::Local<v8::Context>*, v8::Local<v8::Context>*,
......
...@@ -263,7 +263,15 @@ std::unique_ptr<protocol::Runtime::API::RemoteObject> ...@@ -263,7 +263,15 @@ std::unique_ptr<protocol::Runtime::API::RemoteObject>
V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context, V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context,
v8::Local<v8::Value> value, v8::Local<v8::Value> value,
const StringView& groupName) { const StringView& groupName) {
return wrapObject(context, value, toString16(groupName), false); return wrapObject(context, value, groupName, false);
}
std::unique_ptr<protocol::Runtime::API::RemoteObject>
V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context,
v8::Local<v8::Value> value,
const StringView& groupName,
bool generatePreview) {
return wrapObject(context, value, toString16(groupName), generatePreview);
} }
std::unique_ptr<protocol::Runtime::RemoteObject> std::unique_ptr<protocol::Runtime::RemoteObject>
......
...@@ -87,6 +87,9 @@ class V8InspectorSessionImpl : public V8InspectorSession, ...@@ -87,6 +87,9 @@ class V8InspectorSessionImpl : public V8InspectorSession,
std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject( std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Context>, v8::Local<v8::Value>,
const StringView& groupName) override; const StringView& groupName) override;
std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
v8::Local<v8::Context>, v8::Local<v8::Value>, const StringView& groupName,
bool generatePreview) override;
V8InspectorSession::Inspectable* inspectedObject(unsigned num); V8InspectorSession::Inspectable* inspectedObject(unsigned num);
static const unsigned kInspectedObjectBufferSize = 5; static const unsigned kInspectedObjectBufferSize = 5;
......
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