Commit f19ee5e0 authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[api] Deprecate Set/ResetToBookmark

Used to be needed for streaming but we don't use it anymore.

Change-Id: I0947155bec38a6b329452e42204f07170a72c155
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3217195
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77339}
parent 2ede7475
...@@ -465,21 +465,16 @@ class V8_EXPORT ScriptCompiler { ...@@ -465,21 +465,16 @@ class V8_EXPORT ScriptCompiler {
virtual size_t GetMoreData(const uint8_t** src) = 0; virtual size_t GetMoreData(const uint8_t** src) = 0;
/** /**
* V8 calls this method to set a 'bookmark' at the current position in * [DEPRECATED]: No longer used, will be removed soon.
* the source stream, for the purpose of (maybe) later calling
* ResetToBookmark. If ResetToBookmark is called later, then subsequent
* calls to GetMoreData should return the same data as they did when
* SetBookmark was called earlier.
*
* The embedder may return 'false' to indicate it cannot provide this
* functionality.
*/ */
virtual bool SetBookmark(); V8_DEPRECATED("Not used")
virtual bool SetBookmark() { return false; }
/** /**
* V8 calls this to return to a previously set bookmark. * [DEPRECATED]: No longer used, will be removed soon.
*/ */
virtual void ResetToBookmark(); V8_DEPRECATED("Not used")
virtual void ResetToBookmark() {}
}; };
/** /**
......
...@@ -1962,10 +1962,6 @@ ScriptCompiler::CachedData::~CachedData() { ...@@ -1962,10 +1962,6 @@ ScriptCompiler::CachedData::~CachedData() {
} }
} }
bool ScriptCompiler::ExternalSourceStream::SetBookmark() { return false; }
void ScriptCompiler::ExternalSourceStream::ResetToBookmark() { UNREACHABLE(); }
ScriptCompiler::StreamedSource::StreamedSource( ScriptCompiler::StreamedSource::StreamedSource(
std::unique_ptr<ExternalSourceStream> stream, Encoding encoding) std::unique_ptr<ExternalSourceStream> stream, Encoding encoding)
: impl_(new i::ScriptStreamingData(std::move(stream), encoding)) {} : impl_(new i::ScriptStreamingData(std::move(stream), encoding)) {}
......
...@@ -42,8 +42,6 @@ class ChunkSource : public v8::ScriptCompiler::ExternalSourceStream { ...@@ -42,8 +42,6 @@ class ChunkSource : public v8::ScriptCompiler::ExternalSourceStream {
chunks_.push_back({nullptr, 0}); chunks_.push_back({nullptr, 0});
} }
~ChunkSource() override = default; ~ChunkSource() override = default;
bool SetBookmark() override { return false; }
void ResetToBookmark() override {}
size_t GetMoreData(const uint8_t** src) override { size_t GetMoreData(const uint8_t** src) override {
DCHECK_LT(current_, chunks_.size()); DCHECK_LT(current_, chunks_.size());
Chunk& next = chunks_[current_++]; Chunk& next = chunks_[current_++];
......
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