Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a9fe85e

Browse filesBrowse files
ofrobotscjihrig
authored andcommitted
deps: v8_inspector update
Pick up latest from [1] corresponding to the Blink commit 62cd277. [1]: pavelfeldman/v8_inspector@e6b8355 PR-URL: #8014 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
1 parent 2e43599 commit a9fe85e
Copy full SHA for a9fe85e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

69 files changed

+2404
-1941
lines changed
Open diff view settings
Collapse file

‎deps/v8_inspector/README.md‎

Copy file name to clipboardExpand all lines: deps/v8_inspector/README.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ Node.js support for the [Chrome Debug Protocol][https://developer.chrome.com/dev
77
* third_party/v8_inspector/platform/v8_inspector: vendored from https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/v8_inspector
88
* third_party/v8_inspector/platform/inspector_protocol: vendored from https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/inspector_protocol
99
* third_party/jinja2: vendored from https://github.com/mitsuhiko/jinja2
10+
* The `tests/` directory `ext/jinja.el` file have been deleted.
1011
* third_party/markupsafe: vendored from https://github.com/mitsuhiko/markupsafe
Collapse file

‎deps/v8_inspector/third_party/v8_inspector/platform/inspector_protocol/Array.h‎

Copy file name to clipboardExpand all lines: deps/v8_inspector/third_party/v8_inspector/platform/inspector_protocol/Array.h
+26-26Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace blink {
1717
namespace protocol {
1818

1919
template<typename T>
20-
class ArrayBase {
20+
class Array {
2121
public:
2222
static std::unique_ptr<Array<T>> create()
2323
{
@@ -31,54 +31,48 @@ class ArrayBase {
3131
errors->addError("array expected");
3232
return nullptr;
3333
}
34-
errors->push();
3534
std::unique_ptr<Array<T>> result(new Array<T>());
35+
errors->push();
3636
for (size_t i = 0; i < array->size(); ++i) {
3737
errors->setName(String16::fromInteger(i));
38-
T item = FromValue<T>::parse(array->at(i), errors);
39-
result->m_vector.push_back(item);
38+
std::unique_ptr<T> item = ValueConversions<T>::parse(array->at(i), errors);
39+
result->m_vector.push_back(std::move(item));
4040
}
4141
errors->pop();
4242
if (errors->hasErrors())
4343
return nullptr;
4444
return result;
4545
}
4646

47-
void addItem(const T& value)
47+
void addItem(std::unique_ptr<T> value)
4848
{
49-
m_vector.push_back(value);
49+
m_vector.push_back(std::move(value));
5050
}
5151

5252
size_t length()
5353
{
5454
return m_vector.size();
5555
}
5656

57-
T get(size_t index)
57+
T* get(size_t index)
5858
{
59-
return m_vector[index];
59+
return m_vector[index].get();
6060
}
6161

6262
std::unique_ptr<protocol::ListValue> serialize()
6363
{
6464
std::unique_ptr<protocol::ListValue> result = ListValue::create();
6565
for (auto& item : m_vector)
66-
result->pushValue(toValue(item));
66+
result->pushValue(ValueConversions<T>::serialize(item));
6767
return result;
6868
}
6969

7070
private:
71-
std::vector<T> m_vector;
71+
std::vector<std::unique_ptr<T>> m_vector;
7272
};
7373

74-
template<> class Array<String> : public ArrayBase<String> {};
75-
template<> class Array<String16> : public ArrayBase<String16> {};
76-
template<> class Array<int> : public ArrayBase<int> {};
77-
template<> class Array<double> : public ArrayBase<double> {};
78-
template<> class Array<bool> : public ArrayBase<bool> {};
79-
8074
template<typename T>
81-
class Array {
75+
class ArrayBase {
8276
public:
8377
static std::unique_ptr<Array<T>> create()
8478
{
@@ -92,46 +86,52 @@ class Array {
9286
errors->addError("array expected");
9387
return nullptr;
9488
}
95-
std::unique_ptr<Array<T>> result(new Array<T>());
9689
errors->push();
90+
std::unique_ptr<Array<T>> result(new Array<T>());
9791
for (size_t i = 0; i < array->size(); ++i) {
9892
errors->setName(String16::fromInteger(i));
99-
std::unique_ptr<T> item = FromValue<T>::parse(array->at(i), errors);
100-
result->m_vector.push_back(std::move(item));
93+
T item = ValueConversions<T>::parse(array->at(i), errors);
94+
result->m_vector.push_back(item);
10195
}
10296
errors->pop();
10397
if (errors->hasErrors())
10498
return nullptr;
10599
return result;
106100
}
107101

108-
void addItem(std::unique_ptr<T> value)
102+
void addItem(const T& value)
109103
{
110-
m_vector.push_back(std::move(value));
104+
m_vector.push_back(value);
111105
}
112106

113107
size_t length()
114108
{
115109
return m_vector.size();
116110
}
117111

118-
T* get(size_t index)
112+
T get(size_t index)
119113
{
120-
return m_vector[index].get();
114+
return m_vector[index];
121115
}
122116

123117
std::unique_ptr<protocol::ListValue> serialize()
124118
{
125119
std::unique_ptr<protocol::ListValue> result = ListValue::create();
126120
for (auto& item : m_vector)
127-
result->pushValue(toValue(item));
121+
result->pushValue(ValueConversions<T>::serialize(item));
128122
return result;
129123
}
130124

131125
private:
132-
std::vector<std::unique_ptr<T>> m_vector;
126+
std::vector<T> m_vector;
133127
};
134128

129+
template<> class Array<String> : public ArrayBase<String> {};
130+
template<> class Array<String16> : public ArrayBase<String16> {};
131+
template<> class Array<int> : public ArrayBase<int> {};
132+
template<> class Array<double> : public ArrayBase<double> {};
133+
template<> class Array<bool> : public ArrayBase<bool> {};
134+
135135
} // namespace platform
136136
} // namespace blink
137137

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.