Commit 39045667 authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[api] Remove deprecated APIs

The following API methods are removed:
- v8::Module::SetSyntheticModuleExport(...)
- v8::StreamedSource::StreamedSource(...)
- v8::ConsueCodeCacheTask::StartStreamingScript(...)
- v8::Isolate::CreateParams::supported_import_assertions
- v8::Isolate::MeasureMemory(...)
- v8::Isolate::SetModifyCodeGenerationFromStringsCallback(...)
- v8::V8::TryHandleSignal(...)
- v8::V8::SetIsCrossOriginIsolated(...)

Bug: v8:11165
Change-Id: I3d232b375825de6b6469a5589c398835158b8850
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3084364Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76194}
parent f06ef2c3
......@@ -1768,13 +1768,6 @@ class V8_EXPORT Module : public Data {
*/
V8_WARN_UNUSED_RESULT Maybe<bool> SetSyntheticModuleExport(
Isolate* isolate, Local<String> export_name, Local<Value> export_value);
V8_DEPRECATED(
"Use the preceding SetSyntheticModuleExport with an Isolate parameter, "
"instead of the one that follows. The former will throw a runtime "
"error if called for an export that doesn't exist (as per spec); "
"the latter will crash with a failed CHECK().")
void SetSyntheticModuleExport(Local<String> export_name,
Local<Value> export_value);
V8_INLINE static Module* Cast(Data* data);
......@@ -1956,10 +1949,6 @@ class V8_EXPORT ScriptCompiler {
public:
enum Encoding { ONE_BYTE, TWO_BYTE, UTF8, WINDOWS_1252 };
V8_DEPRECATED(
"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();
......@@ -2084,10 +2073,6 @@ class V8_EXPORT ScriptCompiler {
* This API allows to start the streaming with as little data as possible, and
* the remaining data (for example, the ScriptOrigin) is passed to Compile.
*/
V8_DEPRECATED("Use ScriptCompiler::StartStreaming instead.")
static ScriptStreamingTask* StartStreamingScript(
Isolate* isolate, StreamedSource* source,
CompileOptions options = kNoCompileOptions);
static ScriptStreamingTask* StartStreaming(
Isolate* isolate, StreamedSource* source,
ScriptType type = ScriptType::kClassic);
......@@ -8392,11 +8377,6 @@ class V8_EXPORT Isolate {
*/
int embedder_wrapper_type_index = -1;
int embedder_wrapper_object_index = -1;
V8_DEPRECATED(
"Setting this has no effect. Embedders should ignore import assertions "
"that they do not use.")
std::vector<std::string> supported_import_assertions;
};
/**
......@@ -8908,10 +8888,6 @@ class V8_EXPORT Isolate {
std::unique_ptr<MeasureMemoryDelegate> delegate,
MeasureMemoryExecution execution = MeasureMemoryExecution::kDefault);
V8_DEPRECATED("Use the version with a delegate")
MaybeLocal<Promise> MeasureMemory(Local<Context> context,
MeasureMemoryMode mode);
/**
* Get a call stack sample from the isolate.
* \param state Execution state.
......@@ -9589,13 +9565,6 @@ class V8_EXPORT Isolate {
* Set the callback to invoke to check if code generation from
* strings should be allowed.
*/
V8_DEPRECATED(
"Use Isolate::SetModifyCodeGenerationFromStringsCallback with "
"ModifyCodeGenerationFromStringsCallback2 instead. See "
"http://crbug.com/1096017 and TC39 Dynamic Code Brand Checks proposal "
"at https://github.com/tc39/proposal-dynamic-code-brand-checks.")
void SetModifyCodeGenerationFromStringsCallback(
ModifyCodeGenerationFromStringsCallback callback);
void SetModifyCodeGenerationFromStringsCallback(
ModifyCodeGenerationFromStringsCallback2 callback);
......@@ -9943,30 +9912,6 @@ class V8_EXPORT V8 {
*/
static void ShutdownPlatform();
#if V8_OS_POSIX
/**
* Give the V8 signal handler a chance to handle a fault.
*
* This function determines whether a memory access violation can be recovered
* by V8. If so, it will return true and modify context to return to a code
* fragment that can recover from the fault. Otherwise, TryHandleSignal will
* return false.
*
* The parameters to this function correspond to those passed to a Linux
* signal handler.
*
* \param signal_number The signal number.
*
* \param info A pointer to the siginfo_t structure provided to the signal
* handler.
*
* \param context The third argument passed to the Linux signal handler, which
* points to a ucontext_t structure.
*/
V8_DEPRECATED("Use TryHandleWebAssemblyTrapPosix")
static bool TryHandleSignal(int signal_number, void* info, void* context);
#endif // V8_OS_POSIX
/**
* Activate trap-based bounds checking for WebAssembly.
*
......@@ -9994,15 +9939,6 @@ class V8_EXPORT V8 {
*/
static void GetSharedMemoryStatistics(SharedMemoryStatistics* statistics);
/**
* Notifies V8 that the process is cross-origin-isolated, which enables
* defining the SharedArrayBuffer function on the global object of Contexts.
*/
V8_DEPRECATED(
"Use the command line argument --enable-sharedarraybuffer-per-context "
"together with SetSharedArrayBufferConstructorEnabledCallback")
static void SetIsCrossOriginIsolated();
private:
V8();
......
......@@ -1881,10 +1881,6 @@ bool ScriptCompiler::ExternalSourceStream::SetBookmark() { return false; }
void ScriptCompiler::ExternalSourceStream::ResetToBookmark() { UNREACHABLE(); }
ScriptCompiler::StreamedSource::StreamedSource(ExternalSourceStream* stream,
Encoding encoding)
: StreamedSource(std::unique_ptr<ExternalSourceStream>(stream), encoding) {}
ScriptCompiler::StreamedSource::StreamedSource(
std::unique_ptr<ExternalSourceStream> stream, Encoding encoding)
: impl_(new i::ScriptStreamingData(std::move(stream), encoding)) {}
......@@ -2355,21 +2351,6 @@ Maybe<bool> Module::SetSyntheticModuleExport(Isolate* isolate,
return Just(true);
}
void Module::SetSyntheticModuleExport(Local<String> export_name,
Local<v8::Value> export_value) {
i::Handle<i::String> i_export_name = Utils::OpenHandle(*export_name);
i::Handle<i::Object> i_export_value = Utils::OpenHandle(*export_value);
i::Handle<i::Module> self = Utils::OpenHandle(this);
ASSERT_NO_SCRIPT_NO_EXCEPTION(self->GetIsolate());
Utils::ApiCheck(self->IsSyntheticModule(),
"v8::Module::SetSyntheticModuleExport",
"v8::Module::SetSyntheticModuleExport must only be called on "
"a SyntheticModule");
i::SyntheticModule::SetExportStrict(self->GetIsolate(),
i::Handle<i::SyntheticModule>::cast(self),
i_export_name, i_export_value);
}
namespace {
i::ScriptDetails GetScriptDetails(i::Isolate* isolate,
......@@ -2598,14 +2579,6 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
void ScriptCompiler::ScriptStreamingTask::Run() { data_->task->Run(); }
ScriptCompiler::ScriptStreamingTask* ScriptCompiler::StartStreamingScript(
Isolate* v8_isolate, StreamedSource* source, CompileOptions options) {
// We don't support other compile options on streaming background compiles.
// TODO(rmcilroy): remove CompileOptions from the API.
CHECK(options == ScriptCompiler::kNoCompileOptions);
return StartStreaming(v8_isolate, source);
}
ScriptCompiler::ScriptStreamingTask* ScriptCompiler::StartStreaming(
Isolate* v8_isolate, StreamedSource* source, v8::ScriptType type) {
if (!i::FLAG_script_streaming) return nullptr;
......@@ -5922,11 +5895,6 @@ bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info,
return false;
#endif
}
bool V8::TryHandleSignal(int signum, void* info, void* context) {
return TryHandleWebAssemblyTrapPosix(
signum, reinterpret_cast<siginfo_t*>(info), context);
}
#endif
#if V8_OS_WIN
......@@ -6034,8 +6002,6 @@ void V8::GetSharedMemoryStatistics(SharedMemoryStatistics* statistics) {
i::ReadOnlyHeap::PopulateReadOnlySpaceStatistics(statistics);
}
void V8::SetIsCrossOriginIsolated() {}
template <typename ObjectType>
struct InvokeBootstrapper;
......@@ -8734,11 +8700,6 @@ bool Isolate::GetHeapCodeAndMetadataStatistics(
return true;
}
v8::MaybeLocal<v8::Promise> Isolate::MeasureMemory(
v8::Local<v8::Context> context, MeasureMemoryMode mode) {
return v8::MaybeLocal<v8::Promise>();
}
bool Isolate::MeasureMemory(std::unique_ptr<MeasureMemoryDelegate> delegate,
MeasureMemoryExecution execution) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
......
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