Line data Source code
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 198 : RUNTIME_FUNCTION(Runtime_WeakFactoryCleanupJob) {
19 198 : HandleScope scope(isolate);
20 396 : CONVERT_ARG_HANDLE_CHECKED(JSWeakFactory, weak_factory, 0);
21 198 : weak_factory->set_scheduled_for_cleanup(false);
22 :
23 198 : JSWeakFactory::Cleanup(weak_factory, isolate);
24 198 : return ReadOnlyRoots(isolate).undefined_value();
25 : }
26 :
27 : } // namespace internal
28 183867 : } // namespace v8
|