%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
// Copyright 2018 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/builtins/builtins-utils-inl.h" #include "src/logging/counters.h" #include "src/objects/js-weak-refs-inl.h" namespace v8 { namespace internal { BUILTIN(FinalizationRegistryUnregister) { HandleScope scope(isolate); const char* method_name = "FinalizationRegistry.prototype.unregister"; // 1. Let finalizationGroup be the this value. // // 2. If Type(finalizationGroup) is not Object, throw a TypeError // exception. // // 3. If finalizationGroup does not have a [[Cells]] internal slot, // throw a TypeError exception. CHECK_RECEIVER(JSFinalizationRegistry, finalization_registry, method_name); Handle<Object> unregister_token = args.atOrUndefined(isolate, 1); // 4. If Type(unregisterToken) is not Object, throw a TypeError exception. if (!unregister_token->IsJSReceiver()) { THROW_NEW_ERROR_RETURN_FAILURE( isolate, NewTypeError(MessageTemplate::kWeakRefsUnregisterTokenMustBeObject, unregister_token)); } bool success = JSFinalizationRegistry::Unregister( finalization_registry, Handle<JSReceiver>::cast(unregister_token), isolate); return *isolate->factory()->ToBoolean(success); } } // namespace internal } // namespace v8