Commit 9bacf523 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[cleanup] Deprecate EnsureEventLoopInitialized

Due to a recent refactoring the function EnsureEventLoopInitialized on
the default platform became obsolete. It does not contain a single line
of code. With this CL we prepare the removal of this function from the
V8 platform API.

R=rmcilroy@chromium.org

Bug: v8:7310
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: If4d54cd989f8df2f40b322be3b67bb8a482398d0
Reviewed-on: https://chromium-review.googlesource.com/934221
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51635}
parent fa82d01e
......@@ -62,8 +62,10 @@ V8_PLATFORM_EXPORT bool PumpMessageLoop(
v8::Platform* platform, v8::Isolate* isolate,
MessageLoopBehavior behavior = MessageLoopBehavior::kDoNotWait);
V8_PLATFORM_EXPORT void EnsureEventLoopInitialized(v8::Platform* platform,
v8::Isolate* isolate);
V8_PLATFORM_EXPORT V8_DEPRECATE_SOON(
"This function has become obsolete and is essentially a nop",
void EnsureEventLoopInitialized(v8::Platform* platform,
v8::Isolate* isolate));
/**
* Runs pending idle tasks for at most |idle_time_in_seconds| seconds.
......
......@@ -2502,8 +2502,7 @@ void SourceGroup::ExecuteInThread() {
Shell::HostImportModuleDynamically);
isolate->SetHostInitializeImportMetaObjectCallback(
Shell::HostInitializeImportMetaObject);
Shell::EnsureEventLoopInitialized(isolate);
Shell::SetWaitUntilDone(isolate, false);
D8Console console(isolate);
debug::SetConsoleDelegate(isolate, &console);
for (int i = 0; i < Shell::options.stress_runs; ++i) {
......@@ -2925,7 +2924,7 @@ int Shell::RunMain(Isolate* isolate, int argc, char* argv[], bool last_run) {
options.isolate_sources[i].StartExecuteInThread();
}
{
EnsureEventLoopInitialized(isolate);
SetWaitUntilDone(isolate, false);
if (options.lcov_file) {
debug::Coverage::SelectMode(isolate, debug::Coverage::kBlockCount);
}
......@@ -2976,11 +2975,6 @@ void Shell::CollectGarbage(Isolate* isolate) {
}
}
void Shell::EnsureEventLoopInitialized(Isolate* isolate) {
v8::platform::EnsureEventLoopInitialized(GetDefaultPlatform(), isolate);
SetWaitUntilDone(isolate, false);
}
void Shell::SetWaitUntilDone(Isolate* isolate, bool value) {
base::LockGuard<base::Mutex> guard(isolate_status_lock_.Pointer());
if (isolate_status_.count(isolate) == 0) {
......
......@@ -369,7 +369,6 @@ class Shell : public i::AllStatic {
static void OnExit(Isolate* isolate);
static void CollectGarbage(Isolate* isolate);
static bool EmptyMessageQueues(Isolate* isolate);
static void EnsureEventLoopInitialized(Isolate* isolate);
static void CompleteMessageLoop(Isolate* isolate);
static std::unique_ptr<SerializationData> SerializeValue(
......
......@@ -33,8 +33,6 @@ FuzzerSupport::FuzzerSupport(int* argc, char*** argv) {
v8::HandleScope handle_scope(isolate_);
context_.Reset(isolate_, v8::Context::New(isolate_));
}
v8::platform::EnsureEventLoopInitialized(platform_.get(), isolate_);
}
FuzzerSupport::~FuzzerSupport() {
......
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