Commit ab3f78a4 authored by Adam Klein's avatar Adam Klein Committed by V8 LUCI CQ

[parser] Avoid friending std::make_unique to fix MSVC build

Apparently std::make_unique is not a function under MSVC!

Change-Id: I2014e8779ae3434dc265e2a030181e78085beb57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3313349
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78219}
parent 42ed4928
......@@ -531,7 +531,8 @@ class Utf8ExternalStreamingStream final : public BufferedUtf16CharacterStream {
bool can_be_cloned() const final { return true; }
std::unique_ptr<Utf16CharacterStream> Clone() const override {
return std::make_unique<Utf8ExternalStreamingStream>(*this);
return std::unique_ptr<Utf16CharacterStream>(
new Utf8ExternalStreamingStream(*this));
}
protected:
......@@ -568,8 +569,6 @@ class Utf8ExternalStreamingStream final : public BufferedUtf16CharacterStream {
StreamPosition start;
};
friend std::unique_ptr<Utf8ExternalStreamingStream> std::make_unique<
Utf8ExternalStreamingStream>(const Utf8ExternalStreamingStream&);
Utf8ExternalStreamingStream(const Utf8ExternalStreamingStream& source_stream)
V8_NOEXCEPT : chunks_(source_stream.chunks_),
current_({0, {0, 0, 0, unibrow::Utf8::State::kAccept}}),
......
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