Commit 6ade0255 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[v8] Remove deprecated StreamedSource API use

Use the StreamedSource constructor taking a unique_ptr<SourceStream> rather
than the raw pointer version, which is less clear about ownership and so is
deprecated.

Change-Id: I8d95d8049b60925ea11f16249ba18ba5044908d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899848
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: default avatarDan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712626}
parent 143ef2a2
......@@ -435,11 +435,12 @@ bool ScriptStreamer::TryStartStreaming(
DCHECK(!stream_);
DCHECK(!source_);
stream_ = new SourceStream;
auto stream_ptr = std::make_unique<SourceStream>();
stream_ = stream_ptr.get();
// |source_| takes ownership of |stream_|, and will keep |stream_| alive until
// |source_| is destructed.
source_ =
std::make_unique<v8::ScriptCompiler::StreamedSource>(stream_, encoding_);
source_ = std::make_unique<v8::ScriptCompiler::StreamedSource>(
std::move(stream_ptr), encoding_);
std::unique_ptr<v8::ScriptCompiler::ScriptStreamingTask>
script_streaming_task(
......
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