diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-03-15 23:00:44 +0100 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2019-03-28 16:38:12 -0400 |
commit | 8181811d733174d77c74e2896281889d2fecc63c (patch) | |
tree | a082db4811f2887426196ab981f5ccf5e9d68010 /deps/v8/include | |
parent | 1f03fb4d492ea6ba1e6f7f50f68257d7c49817b8 (diff) | |
download | android-node-v8-8181811d733174d77c74e2896281889d2fecc63c.tar.gz android-node-v8-8181811d733174d77c74e2896281889d2fecc63c.tar.bz2 android-node-v8-8181811d733174d77c74e2896281889d2fecc63c.zip |
deps: V8: cherry-pick d82c9af
Original commit message:
[api] Add unique_ptr constructor for StreamedSource
Since StreamedSource takes ownership of the ExternalSourceStream
passed into it, it should take it by unique_ptr rather than raw
pointer to signal this transfer of ownership. The old constructor
is now deprecated.
Change-Id: I24681926c2f3141f7dd3664f72019a4c6deabfd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1520713
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60232}
Refs: https://github.com/v8/v8/commit/d82c9afb8c79255efd8ef65257b14bcf9c64a9c2
PR-URL: https://github.com/nodejs/node/pull/26685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'deps/v8/include')
-rw-r--r-- | deps/v8/include/v8.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 0a19d1aef3..e165ec92a1 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -1535,7 +1535,12 @@ class V8_EXPORT ScriptCompiler { public: enum Encoding { ONE_BYTE, TWO_BYTE, UTF8 }; - StreamedSource(ExternalSourceStream* source_stream, Encoding encoding); + V8_DEPRECATE_SOON( + "This class takes ownership of source_stream, so use the constructor " + "taking a unique_ptr to make these semantics clearer", + StreamedSource(ExternalSourceStream* source_stream, Encoding encoding)); + StreamedSource(std::unique_ptr<ExternalSourceStream> source_stream, + Encoding encoding); ~StreamedSource(); internal::ScriptStreamingData* impl() const { return impl_.get(); } |