From a5e4f3e8b3975adf7bdeda59a792620c6b9ff261 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 17 Feb 2022 23:12:56 +0800 Subject: [PATCH] lib: update class fields TODO in abort_controller.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://bugs.chromium.org/p/v8/issues/detail?id=10704 is already fixed, but since AbortController currently throws ERR_INVALID_THIS we'll revert to class fields in a subsequent patch. For now just update the comments. PR-URL: https://github.com/nodejs/node/pull/42361 Refs: https://github.com/nodejs/node/commit/b1c3909bd766327a569c2e4279a4670454f3f9db Reviewed-By: Michaƫl Zasso Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Antoine du Hamel Reviewed-By: Mestery Reviewed-By: Darshan Sen --- lib/internal/abort_controller.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/internal/abort_controller.js b/lib/internal/abort_controller.js index e0c0d63899972c..7e89e43cc7cead 100644 --- a/lib/internal/abort_controller.js +++ b/lib/internal/abort_controller.js @@ -291,9 +291,8 @@ function abortSignal(signal, reason) { signal.dispatchEvent(event); } -// TODO(joyeecheung): V8 snapshot does not support instance member -// initializers for now: -// https://bugs.chromium.org/p/v8/issues/detail?id=10704 +// TODO(joyeecheung): use private fields and we'll get invalid access +// validation from V8 instead of throwing ERR_INVALID_THIS ourselves. const kSignal = Symbol('signal'); function validateAbortController(obj) {