From 6298245c022343c4c88e51148954e293b6a4e4d9 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Wed, 16 Aug 2023 13:04:09 +0000 Subject: [PATCH] Bug 1848325 - Part 1: Rename CommonPropertyNames empty to empty_. r=jandem Differential Revision: https://phabricator.services.mozilla.com/D186288 --- js/src/builtin/Array.cpp | 6 +++--- js/src/builtin/FinalizationRegistryObject.cpp | 2 +- js/src/builtin/HandlerFunction-inl.h | 2 +- js/src/builtin/JSON.cpp | 8 ++++---- js/src/builtin/Promise.cpp | 10 +++++----- js/src/builtin/ReflectParse.cpp | 2 +- js/src/builtin/RegExp.cpp | 2 +- js/src/frontend/ParserAtom.h | 4 ++-- js/src/frontend/Stencil.cpp | 4 ++-- js/src/jit/BaselineCacheIRCompiler.cpp | 4 ++-- js/src/jit/CacheIRCompiler.cpp | 2 +- js/src/jit/CodeGenerator.cpp | 10 +++++----- js/src/jsapi.cpp | 2 +- js/src/jsdate.cpp | 4 ++-- js/src/shell/js.cpp | 4 ++-- js/src/util/StringBuffer.cpp | 4 ++-- js/src/vm/AsyncFunction.cpp | 2 +- js/src/vm/CommonPropertyNames.h | 2 +- js/src/vm/EnvironmentObject.cpp | 2 +- js/src/vm/ErrorObject-inl.h | 2 +- js/src/vm/GeneratorObject.cpp | 2 +- js/src/vm/JSAtomUtils.cpp | 2 +- js/src/vm/JSFunction-inl.h | 2 +- js/src/vm/JSFunction.cpp | 4 ++-- js/src/vm/Modules.cpp | 2 +- js/src/wasm/WasmFrameIter.cpp | 2 +- 26 files changed, 46 insertions(+), 46 deletions(-) diff --git a/js/src/builtin/Array.cpp b/js/src/builtin/Array.cpp index 24065a64a146..9c48db1af924 100644 --- a/js/src/builtin/Array.cpp +++ b/js/src/builtin/Array.cpp @@ -1265,7 +1265,7 @@ bool js::array_join(JSContext* cx, unsigned argc, Value* vp) { } if (detector.foundCycle()) { - args.rval().setString(cx->names().empty); + args.rval().setString(cx->names().empty_); return true; } @@ -1392,7 +1392,7 @@ static bool array_toLocaleString(JSContext* cx, unsigned argc, Value* vp) { // Avoid calling into self-hosted code if the array is empty. if (obj->is() && obj->as().length() == 0) { - args.rval().setString(cx->names().empty); + args.rval().setString(cx->names().empty_); return true; } @@ -1402,7 +1402,7 @@ static bool array_toLocaleString(JSContext* cx, unsigned argc, Value* vp) { } if (detector.foundCycle()) { - args.rval().setString(cx->names().empty); + args.rval().setString(cx->names().empty_); return true; } diff --git a/js/src/builtin/FinalizationRegistryObject.cpp b/js/src/builtin/FinalizationRegistryObject.cpp index 97d2a46db698..194b858ea9b8 100644 --- a/js/src/builtin/FinalizationRegistryObject.cpp +++ b/js/src/builtin/FinalizationRegistryObject.cpp @@ -662,7 +662,7 @@ FinalizationQueueObject* FinalizationQueueObject::create( return nullptr; } - Handle funName = cx->names().empty; + Handle funName = cx->names().empty_; RootedFunction doCleanupFunction( cx, NewNativeFunction(cx, doCleanup, 0, funName, gc::AllocKind::FUNCTION_EXTENDED)); diff --git a/js/src/builtin/HandlerFunction-inl.h b/js/src/builtin/HandlerFunction-inl.h index baaf3d2777b2..88b4dbb5806e 100644 --- a/js/src/builtin/HandlerFunction-inl.h +++ b/js/src/builtin/HandlerFunction-inl.h @@ -41,7 +41,7 @@ static_assert(HandlerFunctionSlot_Extra < FunctionExtended::NUM_EXTENDED_SLOTS, JS::Handle target) { cx->check(target); - JS::Handle funName = cx->names().empty; + JS::Handle funName = cx->names().empty_; JS::Rooted handlerFun( cx, NewNativeFunction(cx, handler, 0, funName, gc::AllocKind::FUNCTION_EXTENDED, GenericObject)); diff --git a/js/src/builtin/JSON.cpp b/js/src/builtin/JSON.cpp index d75932a9280a..631ef4d907e4 100644 --- a/js/src/builtin/JSON.cpp +++ b/js/src/builtin/JSON.cpp @@ -1611,7 +1611,7 @@ bool js::Stringify(JSContext* cx, MutableHandleValue vp, JSObject* replacer_, } Rooted wrapper(cx); - RootedId emptyId(cx, NameToId(cx->names().empty)); + RootedId emptyId(cx, NameToId(cx->names().empty_)); if (replacer && replacer->isCallable()) { // We can skip creating the initial wrapper object if no replacer // function is present. @@ -1823,11 +1823,11 @@ static bool Revive(JSContext* cx, HandleValue reviver, MutableHandleValue vp) { return false; } - if (!DefineDataProperty(cx, obj, cx->names().empty, vp)) { + if (!DefineDataProperty(cx, obj, cx->names().empty_, vp)) { return false; } - Rooted id(cx, NameToId(cx->names().empty)); + Rooted id(cx, NameToId(cx->names().empty_)); return Walk(cx, obj, id, reviver, vp); } @@ -2054,7 +2054,7 @@ static bool json_parseImmutable(JSContext* cx, unsigned argc, Value* vp) { } } - RootedId id(cx, NameToId(cx->names().empty)); + RootedId id(cx, NameToId(cx->names().empty_)); return BuildImmutableProperty(cx, unfiltered, id, reviver, args.rval()); } #endif diff --git a/js/src/builtin/Promise.cpp b/js/src/builtin/Promise.cpp index 5606e8cf32d8..01f8090d62a3 100644 --- a/js/src/builtin/Promise.cpp +++ b/js/src/builtin/Promise.cpp @@ -1071,7 +1071,7 @@ void js::SetAlreadyResolvedPromiseWithDefaultResolvingFunction( // Step 4. Let resolve be // ! CreateBuiltinFunction(stepsResolve, lengthResolve, "", // « [[Promise]], [[AlreadyResolved]] »). - Handle funName = cx->names().empty; + Handle funName = cx->names().empty_; resolveFn.set(NewNativeFunction(cx, ResolvePromiseFunction, 1, funName, gc::AllocKind::FUNCTION_EXTENDED, GenericObject)); @@ -1497,7 +1497,7 @@ static bool PromiseReactionJob(JSContext* cx, unsigned argc, Value* vp); // Step 1. Let job be a new Job Abstract Closure with no parameters that // captures reaction and argument and performs the following steps // when called: - Handle funName = cx->names().empty; + Handle funName = cx->names().empty_; RootedFunction job( cx, NewNativeFunction(cx, PromiseReactionJob, 0, funName, gc::AllocKind::FUNCTION_EXTENDED, GenericObject)); @@ -1803,7 +1803,7 @@ CreatePromiseObjectWithoutResolutionFunctions(JSContext* cx) { // Step 4. Let executorClosure be a new Abstract Closure with parameters // (resolve, reject) that captures promiseCapability and performs the // following steps when called: - Handle funName = cx->names().empty; + Handle funName = cx->names().empty_; RootedFunction executor( cx, NewNativeFunction(cx, GetCapabilitiesExecutor, 2, funName, gc::AllocKind::FUNCTION_EXTENDED, GenericObject)); @@ -2470,7 +2470,7 @@ static bool PromiseResolveBuiltinThenableJob(JSContext* cx, unsigned argc, // Step 1. Let job be a new Job Abstract Closure with no parameters that // captures promiseToResolve, thenable, and then and performs the // following steps when called: - Handle funName = cx->names().empty; + Handle funName = cx->names().empty_; RootedFunction job( cx, NewNativeFunction(cx, PromiseResolveThenableJob, 0, funName, gc::AllocKind::FUNCTION_EXTENDED, GenericObject)); @@ -2531,7 +2531,7 @@ static bool PromiseResolveBuiltinThenableJob(JSContext* cx, unsigned argc, // Step 1. Let job be a new Job Abstract Closure with no parameters that // captures promiseToResolve, thenable, and then and performs the // following steps when called: - Handle funName = cx->names().empty; + Handle funName = cx->names().empty_; RootedFunction job( cx, NewNativeFunction(cx, PromiseResolveBuiltinThenableJob, 0, funName, gc::AllocKind::FUNCTION_EXTENDED, GenericObject)); diff --git a/js/src/builtin/ReflectParse.cpp b/js/src/builtin/ReflectParse.cpp index b4435e5dc016..c1f0ba9f39fc 100644 --- a/js/src/builtin/ReflectParse.cpp +++ b/js/src/builtin/ReflectParse.cpp @@ -1385,7 +1385,7 @@ class ASTSerializer { DebugOnly lineno; Value unrootedAtomContents(JSAtom* atom) { - return StringValue(atom ? atom : cx->names().empty); + return StringValue(atom ? atom : cx->names().empty_); } BinaryOperator binop(ParseNodeKind kind); diff --git a/js/src/builtin/RegExp.cpp b/js/src/builtin/RegExp.cpp index b1c2e8354dcd..5fae699ba131 100644 --- a/js/src/builtin/RegExp.cpp +++ b/js/src/builtin/RegExp.cpp @@ -409,7 +409,7 @@ static bool RegExpInitializeIgnoringLastIndex(JSContext* cx, Rooted pattern(cx); if (patternValue.isUndefined()) { /* Step 1. */ - pattern = cx->names().empty; + pattern = cx->names().empty_; } else { /* Step 2. */ pattern = ToAtom(cx, patternValue); diff --git a/js/src/frontend/ParserAtom.h b/js/src/frontend/ParserAtom.h index 43c24cfdb278..ef1aae07a74d 100644 --- a/js/src/frontend/ParserAtom.h +++ b/js/src/frontend/ParserAtom.h @@ -186,7 +186,7 @@ class TaggedParserAtomIndex { #undef METHOD_ static constexpr TaggedParserAtomIndex empty() { - return TaggedParserAtomIndex(WellKnownAtomId::empty); + return TaggedParserAtomIndex(WellKnownAtomId::empty_); } }; @@ -232,7 +232,7 @@ class TaggedParserAtomIndex { #undef METHOD_ static constexpr uint32_t empty() { - return uint32_t(WellKnownAtomId::empty) | WellKnownTag | WellKnownSubTag; + return uint32_t(WellKnownAtomId::empty_) | WellKnownTag | WellKnownSubTag; } }; diff --git a/js/src/frontend/Stencil.cpp b/js/src/frontend/Stencil.cpp index 6399111bf9ba..c9c39d18f062 100644 --- a/js/src/frontend/Stencil.cpp +++ b/js/src/frontend/Stencil.cpp @@ -3644,7 +3644,7 @@ void frontend::DumpTaggedParserAtomIndex(js::JSONPrinter& json, json.property("tag", "WellKnown"); auto index = taggedIndex.toWellKnownAtomId(); switch (index) { - case WellKnownAtomId::empty: + case WellKnownAtomId::empty_: json.property("atom", ""); break; @@ -3722,7 +3722,7 @@ void frontend::DumpTaggedParserAtomIndexNoQuote( if (taggedIndex.isWellKnownAtomId()) { auto index = taggedIndex.toWellKnownAtomId(); switch (index) { - case WellKnownAtomId::empty: + case WellKnownAtomId::empty_: out.put("#"); break; diff --git a/js/src/jit/BaselineCacheIRCompiler.cpp b/js/src/jit/BaselineCacheIRCompiler.cpp index 9adfaf076446..7474d741a51d 100644 --- a/js/src/jit/BaselineCacheIRCompiler.cpp +++ b/js/src/jit/BaselineCacheIRCompiler.cpp @@ -990,7 +990,7 @@ bool BaselineCacheIRCompiler::emitArrayJoinResult(ObjOperandId objId, { Label arrayNotEmpty; masm.branch32(Assembler::NotEqual, lengthAddr, Imm32(0), &arrayNotEmpty); - masm.movePtr(ImmGCPtr(cx_->names().empty), scratch); + masm.movePtr(ImmGCPtr(cx_->names().empty_), scratch); masm.tagValue(JSVAL_TYPE_STRING, scratch, output.valueReg()); masm.jump(&finished); masm.bind(&arrayNotEmpty); @@ -1238,7 +1238,7 @@ bool BaselineCacheIRCompiler::emitLoadStringCharResult(StringOperandId strId, allocator.discardStack(masm); // Return the empty string for out-of-bounds access. - masm.movePtr(ImmGCPtr(cx_->names().empty), scratch2); + masm.movePtr(ImmGCPtr(cx_->names().empty_), scratch2); // This CacheIR op is always preceded by |LinearizeForCharAccess|, so we're // guaranteed to see no nested ropes. diff --git a/js/src/jit/CacheIRCompiler.cpp b/js/src/jit/CacheIRCompiler.cpp index 784c0ea2501e..362cd47da506 100644 --- a/js/src/jit/CacheIRCompiler.cpp +++ b/js/src/jit/CacheIRCompiler.cpp @@ -3763,7 +3763,7 @@ bool CacheIRCompiler::emitLoadFunctionNameResult(ObjOperandId objId) { return false; } - masm.loadFunctionName(obj, scratch, ImmGCPtr(cx_->names().empty), + masm.loadFunctionName(obj, scratch, ImmGCPtr(cx_->names().empty_), failure->label()); masm.tagValue(JSVAL_TYPE_STRING, scratch, output.valueReg()); diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index d89269f1f3ac..e6ad78cb7639 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -2232,7 +2232,7 @@ void CreateDependentString::generate(MacroAssembler& masm, // Zero length matches use the empty string. masm.branchTest32(Assembler::NonZero, temp1_, temp1_, &nonEmpty); - masm.movePtr(ImmGCPtr(names.empty), string_); + masm.movePtr(ImmGCPtr(names.empty_), string_); masm.jump(&done); masm.bind(&nonEmpty); @@ -8564,7 +8564,7 @@ void CodeGenerator::visitFunctionName(LFunctionName* lir) { Label bail; const JSAtomState& names = gen->runtime->names(); - masm.loadFunctionName(function, output, ImmGCPtr(names.empty), &bail); + masm.loadFunctionName(function, output, ImmGCPtr(names.empty_), &bail); bailoutFrom(&bail, lir->snapshot()); } @@ -11618,7 +11618,7 @@ void CodeGenerator::visitSubstr(LSubstr* lir) { // Zero length, return emptystring. masm.branchTest32(Assembler::NonZero, length, length, &nonZero); const JSAtomState& names = gen->runtime->names(); - masm.movePtr(ImmGCPtr(names.empty), output); + masm.movePtr(ImmGCPtr(names.empty_), output); masm.jump(done); // Substring from 0..|str.length|, return str. @@ -12058,7 +12058,7 @@ void CodeGenerator::visitCharAtMaybeOutOfBounds(LCharAtMaybeOutOfBounds* lir) { // Return the empty string for out-of-bounds access. const JSAtomState& names = gen->runtime->names(); - masm.movePtr(ImmGCPtr(names.empty), output); + masm.movePtr(ImmGCPtr(names.empty_), output); masm.spectreBoundsCheck32(index, Address(str, JSString::offsetOfLength()), temp0, oolFromCharCode->rejoin()); @@ -13614,7 +13614,7 @@ void CodeGenerator::visitArrayJoin(LArrayJoin* lir) { Label notEmpty; masm.branch32(Assembler::NotEqual, length, Imm32(0), ¬Empty); const JSAtomState& names = gen->runtime->names(); - masm.movePtr(ImmGCPtr(names.empty), output); + masm.movePtr(ImmGCPtr(names.empty_), output); masm.jump(&skipCall); masm.bind(¬Empty); diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 6f287910c3df..2fdb604068e8 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -3121,7 +3121,7 @@ JS_PUBLIC_API JSString* JS_NewUCStringCopyN(JSContext* cx, const char16_t* s, AssertHeapIsIdle(); CHECK_THREAD(cx); if (!n) { - return cx->names().empty; + return cx->names().empty_; } return NewStringCopyN(cx, s, n); } diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp index b5c8b58cde2e..c5086a3dab8e 100644 --- a/js/src/jsdate.cpp +++ b/js/src/jsdate.cpp @@ -2970,7 +2970,7 @@ JSString* DateTimeHelper::timeZoneComment(JSContext* cx, // Reject if the result string is empty. size_t len = js_strlen(timeZoneStart); if (len == 0) { - return cx->names().empty; + return cx->names().empty_; } // Parenthesize the returned display name. @@ -3048,7 +3048,7 @@ JSString* DateTimeHelper::timeZoneComment(JSContext* cx, } } - return cx->names().empty; + return cx->names().empty_; } #endif /* JS_HAS_INTL_API */ diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 5c88f37b9e3a..460bb935d72f 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -1968,7 +1968,7 @@ static bool CreateUserArrayBuffer(JSContext* cx, unsigned argc, Value* vp) { // The reference is made through a private name, because we don't want to // expose |userBuffer| to user-code. - auto* privateName = NewPrivateName(cx, cx->names().empty.toHandle()); + auto* privateName = NewPrivateName(cx, cx->names().empty_.toHandle()); if (!privateName) { return false; } @@ -8744,7 +8744,7 @@ static bool TransplantableObject(JSContext* cx, unsigned argc, Value* vp) { } } - jsid emptyId = NameToId(cx->names().empty); + jsid emptyId = NameToId(cx->names().empty_); RootedObject transplant( cx, NewFunctionByIdWithReserved(cx, TransplantObject, 0, 0, emptyId)); if (!transplant) { diff --git a/js/src/util/StringBuffer.cpp b/js/src/util/StringBuffer.cpp index a1c33ff23565..d780c1a811c8 100644 --- a/js/src/util/StringBuffer.cpp +++ b/js/src/util/StringBuffer.cpp @@ -122,7 +122,7 @@ JSLinearString* JSStringBuilder::finishString() { size_t len = length(); if (len == 0) { - return maybeCx_->names().empty; + return maybeCx_->names().empty_; } if (MOZ_UNLIKELY(!JSString::validateLength(maybeCx_, len))) { @@ -143,7 +143,7 @@ JSAtom* StringBuffer::finishAtom() { size_t len = length(); if (len == 0) { - return maybeCx_->names().empty; + return maybeCx_->names().empty_; } if (isLatin1()) { diff --git a/js/src/vm/AsyncFunction.cpp b/js/src/vm/AsyncFunction.cpp index 7b2482f2a92b..88f45bb2935f 100644 --- a/js/src/vm/AsyncFunction.cpp +++ b/js/src/vm/AsyncFunction.cpp @@ -264,7 +264,7 @@ JSFunction* NewHandler(JSContext* cx, Native handler, JS::Handle target) { cx->check(target); - JS::Handle funName = cx->names().empty; + JS::Handle funName = cx->names().empty_; JS::Rooted handlerFun( cx, NewNativeFunction(cx, handler, 0, funName, gc::AllocKind::FUNCTION_EXTENDED, GenericObject)); diff --git a/js/src/vm/CommonPropertyNames.h b/js/src/vm/CommonPropertyNames.h index 9de8c5b96da3..af4e814cb228 100644 --- a/js/src/vm/CommonPropertyNames.h +++ b/js/src/vm/CommonPropertyNames.h @@ -156,7 +156,7 @@ MACRO_(element, "element") \ MACRO_(elementType, "elementType") \ MACRO_(else_, "else") \ - MACRO0(empty, "") \ + MACRO0(empty_, "") \ MACRO_(emptyRegExp, "(?:)") \ MACRO_(encodeURI, "encodeURI") \ MACRO_(encodeURIComponent, "encodeURIComponent") \ diff --git a/js/src/vm/EnvironmentObject.cpp b/js/src/vm/EnvironmentObject.cpp index b90f142c9da6..d7cc2f3b932d 100644 --- a/js/src/vm/EnvironmentObject.cpp +++ b/js/src/vm/EnvironmentObject.cpp @@ -72,7 +72,7 @@ PropertyName* js::EnvironmentCoordinateNameSlow(JSScript* script, /* Beware nameless destructuring formal. */ if (!id.isAtom()) { - return script->runtimeFromAnyThread()->commonNames->empty; + return script->runtimeFromAnyThread()->commonNames->empty_; } return id.toAtom()->asPropertyName(); } diff --git a/js/src/vm/ErrorObject-inl.h b/js/src/vm/ErrorObject-inl.h index 9da8e3fc7a49..907cea38c3da 100644 --- a/js/src/vm/ErrorObject-inl.h +++ b/js/src/vm/ErrorObject-inl.h @@ -14,7 +14,7 @@ inline JSString* js::ErrorObject::fileName(JSContext* cx) const { Value val = getReservedSlot(FILENAME_SLOT); - return val.isString() ? val.toString() : cx->names().empty; + return val.isString() ? val.toString() : cx->names().empty_; } inline uint32_t js::ErrorObject::sourceId() const { diff --git a/js/src/vm/GeneratorObject.cpp b/js/src/vm/GeneratorObject.cpp index 08f1ebd9480d..3a5170670d42 100644 --- a/js/src/vm/GeneratorObject.cpp +++ b/js/src/vm/GeneratorObject.cpp @@ -96,7 +96,7 @@ JSObject* AbstractGeneratorObject::createModuleGenerator( // Create a handler function to wrap the module's script. This way // we can access it later and restore the state. - Handle funName = cx->names().empty; + Handle funName = cx->names().empty_; RootedFunction handlerFun( cx, NewFunctionWithProto(cx, nullptr, 0, FunctionFlags::INTERPRETED_GENERATOR_OR_ASYNC, diff --git a/js/src/vm/JSAtomUtils.cpp b/js/src/vm/JSAtomUtils.cpp index d07b98ff54d8..b8431f96055e 100644 --- a/js/src/vm/JSAtomUtils.cpp +++ b/js/src/vm/JSAtomUtils.cpp @@ -271,7 +271,7 @@ bool JSRuntime::initializeAtoms(JSContext* cx) { } MOZ_ASSERT(uintptr_t(names) == uintptr_t(commonNames + 1)); - emptyString = commonNames->empty; + emptyString = commonNames->empty_; // The self-hosted atoms are those that exist in a self-hosted JS source file, // but are not defined in any of the well-known atom collections. diff --git a/js/src/vm/JSFunction-inl.h b/js/src/vm/JSFunction-inl.h index d9fe38da68bf..c0eb5d86e53a 100644 --- a/js/src/vm/JSFunction-inl.h +++ b/js/src/vm/JSFunction-inl.h @@ -117,7 +117,7 @@ inline JSAtom* JSFunction::infallibleGetUnresolvedName(JSContext* cx) { return name; } - return cx->names().empty; + return cx->names().empty_; } /* static */ inline bool JSFunction::getAllocKindForThis( diff --git a/js/src/vm/JSFunction.cpp b/js/src/vm/JSFunction.cpp index 9ee10cfe0a27..3fe760a7c399 100644 --- a/js/src/vm/JSFunction.cpp +++ b/js/src/vm/JSFunction.cpp @@ -688,7 +688,7 @@ static JSObject* CreateFunctionPrototype(JSContext* cx, JSProtoKey key) { return NewFunctionWithProto( cx, FunctionPrototype, 0, FunctionFlags::NATIVE_FUN, nullptr, - Handle(cx->names().empty), objectProto, + Handle(cx->names().empty_), objectProto, gc::AllocKind::FUNCTION, TenuredObject); } @@ -1753,7 +1753,7 @@ static JSAtom* SymbolToFunctionName(JSContext* cx, JS::Symbol* symbol, // Step 4.b, no prefix fastpath. if (!desc && prefixKind == FunctionPrefixKind::None) { - return cx->names().empty; + return cx->names().empty_; } // Step 5 (reordered). diff --git a/js/src/vm/Modules.cpp b/js/src/vm/Modules.cpp index 2f682e149d6e..4a6e4dd84253 100644 --- a/js/src/vm/Modules.cpp +++ b/js/src/vm/Modules.cpp @@ -899,7 +899,7 @@ static void ThrowResolutionError(JSContext* cx, Handle module, filename = JS_NewStringCopyUTF8Z(cx, JS::ConstUTF8CharsZ(chars, strlen(chars))); } else { - filename = cx->names().empty; + filename = cx->names().empty_; } if (!filename) { return; diff --git a/js/src/wasm/WasmFrameIter.cpp b/js/src/wasm/WasmFrameIter.cpp index ae1afe6da4ae..5cc0ff82fee3 100644 --- a/js/src/wasm/WasmFrameIter.cpp +++ b/js/src/wasm/WasmFrameIter.cpp @@ -267,7 +267,7 @@ JSAtom* WasmFrameIter::functionDisplayAtom() const { JSAtom* atom = instance()->getFuncDisplayAtom(cx, codeRange_->funcIndex()); if (!atom) { cx->clearPendingException(); - return cx->names().empty; + return cx->names().empty_; } return atom;