From c97feb94eef69a452ee02b847988b618376273ca Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Wed, 7 Oct 2020 11:34:14 -0700 Subject: [PATCH] [top-level-await] Make Module::IsGraphAsync const Bug: v8:9344 Change-Id: Id91afc60989afd45c4c0d00696afb4c81489f0ee Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2458146 Auto-Submit: Shu-yu Guo Commit-Queue: Camillo Bruni Reviewed-by: Camillo Bruni Cr-Commit-Position: refs/heads/master@{#70398} --- src/objects/module.cc | 2 +- src/objects/module.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objects/module.cc b/src/objects/module.cc index b50c711008..87b7a2f664 100644 --- a/src/objects/module.cc +++ b/src/objects/module.cc @@ -371,7 +371,7 @@ Maybe JSModuleNamespace::GetPropertyAttributes( return Just(it->property_attributes()); } -bool Module::IsGraphAsync(Isolate* isolate) { +bool Module::IsGraphAsync(Isolate* isolate) const { DisallowGarbageCollection no_gc; // Only SourceTextModules may be async. diff --git a/src/objects/module.h b/src/objects/module.h index 82429bb62c..f76bd98f00 100644 --- a/src/objects/module.h +++ b/src/objects/module.h @@ -65,7 +65,7 @@ class Module : public HeapObject { // Returns if this module or any transitively requested module is [[Async]], // i.e. has a top-level await. - V8_WARN_UNUSED_RESULT bool IsGraphAsync(Isolate* isolate); + V8_WARN_UNUSED_RESULT bool IsGraphAsync(Isolate* isolate) const; // Implementation of spec operation ModuleDeclarationInstantiation. // Returns false if an exception occurred during instantiation, true