[api] Advance API deprecation
Remove the following deprecated functions: include/v8-inspector.h:364 v10.3 Use version with client_is_trusted argument include/v8-locker.h:130 v10.3 This method will be removed. include/v8-message.h:90 v10.3 Use GetHostDefinedOptions include/v8-script.h:51 v10.0 Use HostDefinedOptions include/v8-script.h:671 v10.0 Use CompileFunction Output generated by tools/release/list_deprecated.py. Remove CompileFunctionInContext for chrome and only implement it if V8_SCRIPTORMODULE_LEGACY_LIFETIME is defined. Change-Id: I33dd3665220f484e277e66f340e17ed2c3b49916 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702449 Reviewed-by: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Auto-Submit: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#82476}
This commit is contained in:
parent
20f232060d
commit
65034fdf54
@ -361,12 +361,6 @@ class V8_EXPORT V8Inspector {
|
|||||||
virtual void sendNotification(std::unique_ptr<StringBuffer> message) = 0;
|
virtual void sendNotification(std::unique_ptr<StringBuffer> message) = 0;
|
||||||
virtual void flushProtocolNotifications() = 0;
|
virtual void flushProtocolNotifications() = 0;
|
||||||
};
|
};
|
||||||
V8_DEPRECATED("Use version with client_is_trusted argument")
|
|
||||||
virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId,
|
|
||||||
Channel* channel,
|
|
||||||
StringView state) {
|
|
||||||
return connect(contextGroupId, channel, state, kFullyTrusted);
|
|
||||||
}
|
|
||||||
enum ClientTrustLevel { kUntrusted, kFullyTrusted };
|
enum ClientTrustLevel { kUntrusted, kFullyTrusted };
|
||||||
virtual std::unique_ptr<V8InspectorSession> connect(
|
virtual std::unique_ptr<V8InspectorSession> connect(
|
||||||
int contextGroupId, Channel*, StringView state,
|
int contextGroupId, Channel*, StringView state,
|
||||||
|
@ -121,15 +121,6 @@ class V8_EXPORT Locker {
|
|||||||
*/
|
*/
|
||||||
static bool IsLocked(Isolate* isolate);
|
static bool IsLocked(Isolate* isolate);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns whether any v8::Locker has ever been used in this process.
|
|
||||||
* TODO(cbruni, chromium:1240851): Fix locking checks on a per-thread basis.
|
|
||||||
* The current implementation is quite confusing and leads to unexpected
|
|
||||||
* results if anybody uses v8::Locker in the current process.
|
|
||||||
*/
|
|
||||||
V8_DEPRECATED("This method will be removed.")
|
|
||||||
static bool WasEverUsed();
|
|
||||||
|
|
||||||
// Disallow copying and assigning.
|
// Disallow copying and assigning.
|
||||||
Locker(const Locker&) = delete;
|
Locker(const Locker&) = delete;
|
||||||
void operator=(const Locker&) = delete;
|
void operator=(const Locker&) = delete;
|
||||||
|
@ -87,8 +87,6 @@ class V8_EXPORT ScriptOrigin {
|
|||||||
V8_INLINE int ColumnOffset() const;
|
V8_INLINE int ColumnOffset() const;
|
||||||
V8_INLINE int ScriptId() const;
|
V8_INLINE int ScriptId() const;
|
||||||
V8_INLINE Local<Value> SourceMapUrl() const;
|
V8_INLINE Local<Value> SourceMapUrl() const;
|
||||||
V8_DEPRECATED("Use GetHostDefinedOptions")
|
|
||||||
Local<PrimitiveArray> HostDefinedOptions() const;
|
|
||||||
V8_INLINE Local<Data> GetHostDefinedOptions() const;
|
V8_INLINE Local<Data> GetHostDefinedOptions() const;
|
||||||
V8_INLINE ScriptOriginOptions Options() const { return options_; }
|
V8_INLINE ScriptOriginOptions Options() const { return options_; }
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@ class V8_EXPORT ScriptOrModule {
|
|||||||
* The options that were passed by the embedder as HostDefinedOptions to
|
* The options that were passed by the embedder as HostDefinedOptions to
|
||||||
* the ScriptOrigin.
|
* the ScriptOrigin.
|
||||||
*/
|
*/
|
||||||
V8_DEPRECATED("Use HostDefinedOptions")
|
|
||||||
Local<PrimitiveArray> GetHostDefinedOptions();
|
|
||||||
Local<Data> HostDefinedOptions();
|
Local<Data> HostDefinedOptions();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -706,6 +704,7 @@ class V8_EXPORT ScriptCompiler {
|
|||||||
CompileOptions options = kNoCompileOptions,
|
CompileOptions options = kNoCompileOptions,
|
||||||
NoCacheReason no_cache_reason = kNoCacheNoReason,
|
NoCacheReason no_cache_reason = kNoCacheNoReason,
|
||||||
Local<ScriptOrModule>* script_or_module_out = nullptr);
|
Local<ScriptOrModule>* script_or_module_out = nullptr);
|
||||||
|
|
||||||
static V8_WARN_UNUSED_RESULT MaybeLocal<Function> CompileFunction(
|
static V8_WARN_UNUSED_RESULT MaybeLocal<Function> CompileFunction(
|
||||||
Local<Context> context, Source* source, size_t arguments_count = 0,
|
Local<Context> context, Source* source, size_t arguments_count = 0,
|
||||||
Local<String> arguments[] = nullptr, size_t context_extension_count = 0,
|
Local<String> arguments[] = nullptr, size_t context_extension_count = 0,
|
||||||
|
@ -193,17 +193,6 @@ static ScriptOrigin GetScriptOriginForScript(i::Isolate* i_isolate,
|
|||||||
return origin;
|
return origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
Local<PrimitiveArray> ScriptOrigin::HostDefinedOptions() const {
|
|
||||||
// TODO(cbruni, chromium:1244145): remove once migrated to the context.
|
|
||||||
Utils::ApiCheck(!host_defined_options_->IsFixedArray(),
|
|
||||||
"ScriptOrigin::HostDefinedOptions",
|
|
||||||
"HostDefinedOptions is not a PrimitiveArray, please use "
|
|
||||||
"ScriptOrigin::GetHostDefinedOptions()");
|
|
||||||
i::Handle<i::FixedArray> options =
|
|
||||||
Utils::OpenHandle(*host_defined_options_.As<FixedArray>());
|
|
||||||
return Utils::PrimitiveArrayToLocal(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- E x c e p t i o n B e h a v i o r ---
|
// --- E x c e p t i o n B e h a v i o r ---
|
||||||
|
|
||||||
// When V8 cannot allocate memory FatalProcessOutOfMemory is called. The default
|
// When V8 cannot allocate memory FatalProcessOutOfMemory is called. The default
|
||||||
@ -2170,10 +2159,6 @@ Local<Value> ScriptOrModule::GetResourceName() {
|
|||||||
return ToApiHandle<Value>(val);
|
return ToApiHandle<Value>(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
Local<PrimitiveArray> ScriptOrModule::GetHostDefinedOptions() {
|
|
||||||
return HostDefinedOptions().As<PrimitiveArray>();
|
|
||||||
}
|
|
||||||
|
|
||||||
Local<Data> ScriptOrModule::HostDefinedOptions() {
|
Local<Data> ScriptOrModule::HostDefinedOptions() {
|
||||||
i::Handle<i::ScriptOrModule> obj = Utils::OpenHandle(this);
|
i::Handle<i::ScriptOrModule> obj = Utils::OpenHandle(this);
|
||||||
i::Isolate* i_isolate = i::GetIsolateFromWritableObject(*obj);
|
i::Isolate* i_isolate = i::GetIsolateFromWritableObject(*obj);
|
||||||
@ -2632,6 +2617,7 @@ V8_WARN_UNUSED_RESULT MaybeLocal<Function> ScriptCompiler::CompileFunction(
|
|||||||
options, no_cache_reason, nullptr);
|
options, no_cache_reason, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef V8_SCRIPTORMODULE_LEGACY_LIFETIME
|
||||||
// static
|
// static
|
||||||
MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
|
MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
|
||||||
Local<Context> context, Source* source, size_t arguments_count,
|
Local<Context> context, Source* source, size_t arguments_count,
|
||||||
@ -2643,6 +2629,7 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
|
|||||||
context, source, arguments_count, arguments, context_extension_count,
|
context, source, arguments_count, arguments, context_extension_count,
|
||||||
context_extensions, options, no_cache_reason, script_or_module_out);
|
context_extensions, options, no_cache_reason, script_or_module_out);
|
||||||
}
|
}
|
||||||
|
#endif // V8_SCRIPTORMODULE_LEGACY_LIFETIME
|
||||||
|
|
||||||
MaybeLocal<Function> ScriptCompiler::CompileFunctionInternal(
|
MaybeLocal<Function> ScriptCompiler::CompileFunctionInternal(
|
||||||
Local<Context> v8_context, Source* source, size_t arguments_count,
|
Local<Context> v8_context, Source* source, size_t arguments_count,
|
||||||
|
@ -56,11 +56,6 @@ bool Locker::IsLocked(v8::Isolate* isolate) {
|
|||||||
return i_isolate->thread_manager()->IsLockedByCurrentThread();
|
return i_isolate->thread_manager()->IsLockedByCurrentThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
|
||||||
bool Locker::WasEverUsed() {
|
|
||||||
return base::Relaxed_Load(&g_locker_was_ever_used_) != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Locker::~Locker() {
|
Locker::~Locker() {
|
||||||
DCHECK(isolate_->thread_manager()->IsLockedByCurrentThread());
|
DCHECK(isolate_->thread_manager()->IsLockedByCurrentThread());
|
||||||
if (has_lock_) {
|
if (has_lock_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user