V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
runtime-weak-refs.cc
1 // Copyright 2018 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "include/v8.h"
6 #include "src/api.h"
7 #include "src/arguments-inl.h"
8 #include "src/counters.h"
9 #include "src/execution.h"
10 #include "src/handles-inl.h"
11 #include "src/objects-inl.h"
12 #include "src/objects/js-weak-refs-inl.h"
13 #include "src/runtime/runtime-utils.h"
14 
15 namespace v8 {
16 namespace internal {
17 
18 RUNTIME_FUNCTION(Runtime_WeakFactoryCleanupJob) {
19  HandleScope scope(isolate);
20  CONVERT_ARG_HANDLE_CHECKED(JSWeakFactory, weak_factory, 0);
21  weak_factory->set_scheduled_for_cleanup(false);
22 
23  JSWeakFactory::Cleanup(weak_factory, isolate);
24  return ReadOnlyRoots(isolate).undefined_value();
25 }
26 
27 } // namespace internal
28 } // namespace v8
Definition: libplatform.h:13