From c7bc4f2846066099a2442d6b7f78e3d64c6a9cdd Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Fri, 30 Oct 2020 06:33:56 +0000 Subject: [PATCH] Bug 1663365 - Don't include "js/friend/ErrorMessages.h" in jsfriendapi.h. r=arai Differential Revision: https://phabricator.services.mozilla.com/D95208 --- dom/fetch/FetchUtil.cpp | 1 + dom/plugins/base/nsJSNPRuntime.cpp | 1 + dom/script/ScriptLoader.cpp | 1 + dom/script/ScriptSettings.cpp | 1 + dom/system/OSFileConstants.cpp | 1 + dom/workers/RuntimeService.cpp | 1 + dom/workers/WorkerError.cpp | 1 + dom/workers/WorkerPrivate.cpp | 1 + js/rust/etc/wrapper.hpp | 1 + js/src/builtin/Array.cpp | 1 + js/src/builtin/AtomicsObject.cpp | 1 + js/src/builtin/BigInt.cpp | 1 + js/src/builtin/DataViewObject.cpp | 1 + js/src/builtin/Eval.cpp | 1 + js/src/builtin/FinalizationRegistryObject.cpp | 1 + js/src/builtin/JSON.cpp | 1 + js/src/builtin/ModuleObject.cpp | 1 + js/src/builtin/Object.cpp | 1 + js/src/builtin/Promise.cpp | 1 + js/src/builtin/Reflect.cpp | 1 + js/src/builtin/ReflectParse.cpp | 1 + js/src/builtin/RegExp.cpp | 1 + js/src/builtin/Stream.cpp | 1 + js/src/builtin/String.cpp | 1 + js/src/builtin/Symbol.cpp | 3 ++- js/src/builtin/TestingFunctions.cpp | 1 + js/src/builtin/WeakMapObject-inl.h | 1 + js/src/builtin/WeakMapObject.cpp | 1 + js/src/builtin/WeakRefObject.cpp | 2 ++ js/src/builtin/WeakSetObject.cpp | 1 + js/src/builtin/intl/CommonFunctions.cpp | 3 +-- js/src/builtin/intl/DateTimeFormat.cpp | 1 + js/src/builtin/intl/DisplayNames.cpp | 1 + js/src/builtin/intl/IntlObject.cpp | 1 + js/src/builtin/intl/LanguageTag.cpp | 1 + js/src/builtin/intl/Locale.cpp | 1 + js/src/builtin/intl/RelativeTimeFormat.cpp | 1 + js/src/builtin/streams/MiscellaneousOperations.cpp | 2 +- js/src/builtin/streams/PipeToState.cpp | 2 +- js/src/builtin/streams/QueueWithSizes.cpp | 1 + js/src/builtin/streams/ReadableStream.cpp | 2 +- js/src/builtin/streams/ReadableStreamBYOBReader.cpp | 2 +- js/src/builtin/streams/ReadableStreamDefaultController.cpp | 3 ++- js/src/builtin/streams/ReadableStreamDefaultReader.cpp | 2 +- js/src/builtin/streams/ReadableStreamReader.cpp | 3 ++- js/src/builtin/streams/StreamAPI.cpp | 3 ++- js/src/builtin/streams/WritableStream.cpp | 2 +- js/src/builtin/streams/WritableStreamDefaultController.cpp | 1 + js/src/builtin/streams/WritableStreamDefaultWriter.cpp | 2 +- js/src/builtin/streams/WritableStreamOperations.cpp | 2 +- js/src/builtin/streams/WritableStreamWriterOperations.cpp | 2 +- js/src/ctypes/CTypes.cpp | 1 + js/src/debugger/Debugger.cpp | 2 +- js/src/debugger/DebuggerMemory.cpp | 1 + js/src/debugger/Environment.cpp | 2 +- js/src/debugger/Frame.cpp | 2 +- js/src/debugger/NoExecute.cpp | 2 +- js/src/debugger/Object.cpp | 2 +- js/src/debugger/Script.cpp | 2 +- js/src/frontend/BytecodeEmitter.cpp | 1 + js/src/frontend/EmitterScope.cpp | 1 + js/src/frontend/Frontend2.cpp | 1 + js/src/frontend/ParseContext.cpp | 3 +++ js/src/frontend/ParseContext.h | 1 + js/src/frontend/Parser.cpp | 1 + js/src/frontend/Parser.h | 1 + js/src/frontend/SwitchEmitter.cpp | 1 + js/src/frontend/TokenStream.cpp | 1 + js/src/frontend/TokenStream.h | 1 + js/src/irregexp/RegExpAPI.cpp | 1 + js/src/jit/BaselineCodeGen.cpp | 1 + js/src/jit/BaselineIC.cpp | 1 + js/src/jit/IonBuilder.cpp | 1 + js/src/jit/VMFunctions.cpp | 1 + js/src/jit/WarpBuilder.cpp | 1 + js/src/jsapi-tests/testArrayBuffer.cpp | 1 + js/src/jsapi-tests/testBigInt.cpp | 2 +- js/src/jsapi-tests/testCompileUtf8.cpp | 1 + js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp | 1 + js/src/jsapi-tests/testParseJSON.cpp | 1 + js/src/jsapi.cpp | 1 + js/src/jsdate.cpp | 1 + js/src/jsexn.cpp | 1 + js/src/jsfriendapi.cpp | 1 + js/src/jsfriendapi.h | 1 - js/src/jsnum.cpp | 1 + js/src/jsnum.h | 2 +- js/src/proxy/BaseProxyHandler.cpp | 1 + js/src/proxy/DeadObjectProxy.cpp | 1 + js/src/proxy/OpaqueCrossCompartmentWrapper.cpp | 1 + js/src/proxy/Proxy.cpp | 1 + js/src/proxy/ScriptedProxyHandler.cpp | 1 + js/src/proxy/SecurityWrapper.cpp | 1 + js/src/proxy/Wrapper.cpp | 1 + js/src/shell/js.cpp | 1 + js/src/util/CompleteFile.cpp | 3 ++- js/src/util/StringBuffer.cpp | 1 + js/src/vm/ArrayBufferObject.cpp | 1 + js/src/vm/AsyncIteration.cpp | 1 + js/src/vm/BigIntType.cpp | 1 + js/src/vm/BytecodeUtil.cpp | 1 + js/src/vm/CharacterEncoding.cpp | 1 + js/src/vm/Compartment-inl.h | 1 + js/src/vm/CompilationAndEvaluation.cpp | 2 +- js/src/vm/EnvironmentObject.cpp | 1 + js/src/vm/ErrorObject.cpp | 1 + js/src/vm/ErrorReporting.cpp | 1 + js/src/vm/ForOfIterator.cpp | 1 + js/src/vm/GlobalObject.cpp | 1 + js/src/vm/Interpreter-inl.h | 1 + js/src/vm/Interpreter.cpp | 1 + js/src/vm/Iteration.cpp | 1 + js/src/vm/JSAtom.cpp | 1 + js/src/vm/JSContext.cpp | 1 + js/src/vm/JSFunction.cpp | 1 + js/src/vm/JSONParser.cpp | 1 + js/src/vm/JSObject.cpp | 1 + js/src/vm/JSObject.h | 1 + js/src/vm/JSScript.cpp | 1 + js/src/vm/NativeObject-inl.h | 1 + js/src/vm/NativeObject.cpp | 1 + js/src/vm/Realm.cpp | 1 + js/src/vm/RegExpObject.cpp | 1 + js/src/vm/Runtime.cpp | 1 + js/src/vm/SavedStacks.cpp | 1 + js/src/vm/SelfHosting.cpp | 1 + js/src/vm/SharedArrayObject.cpp | 1 + js/src/vm/Stack.cpp | 1 + js/src/vm/Stack.h | 1 + js/src/vm/StringType.cpp | 1 + js/src/vm/StructuredClone.cpp | 1 + js/src/vm/ThrowMsgKind.cpp | 2 +- js/src/vm/TraceLogging.cpp | 1 + js/src/vm/TraceLogging.h | 1 + js/src/vm/TypedArrayObject.cpp | 1 + js/src/vm/UbiNodeCensus.cpp | 1 + js/src/vm/Warnings.cpp | 2 +- js/src/wasm/AsmJS.cpp | 1 + js/src/wasm/TypedObject.cpp | 1 + js/src/wasm/WasmBuiltins.cpp | 1 + js/src/wasm/WasmInstance.cpp | 1 + js/src/wasm/WasmJS.cpp | 5 +++-- js/src/wasm/WasmModule.cpp | 1 + js/src/wasm/WasmTypes.cpp | 1 + 144 files changed, 153 insertions(+), 30 deletions(-) diff --git a/dom/fetch/FetchUtil.cpp b/dom/fetch/FetchUtil.cpp index 0d51eaed77e2..80cb1fb97bcd 100644 --- a/dom/fetch/FetchUtil.cpp +++ b/dom/fetch/FetchUtil.cpp @@ -6,6 +6,7 @@ #include "FetchUtil.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "nsCRT.h" #include "nsError.h" #include "nsIAsyncInputStream.h" diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index 78f75f772b22..176e471be463 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -23,6 +23,7 @@ #include "nsIContent.h" #include "nsPluginInstanceOwner.h" #include "nsWrapperCacheInlines.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/GCHashTable.h" #include "js/Object.h" // JS::GetClass, JS::GetCompartment, JS::GetPrivate, JS::SetPrivate #include "js/Symbol.h" diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp index 1ab6104581d6..bf6e7b64d7d6 100644 --- a/dom/script/ScriptLoader.cpp +++ b/dom/script/ScriptLoader.cpp @@ -16,6 +16,7 @@ #include "jsfriendapi.h" #include "js/Array.h" // JS::GetArrayLength #include "js/CompilationAndEvaluation.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/MemoryFunctions.h" #include "js/Modules.h" // JS::FinishDynamicModuleImport, JS::{G,S}etModuleResolveHook, JS::Get{ModulePrivate,ModuleScript,RequestedModule{s,Specifier,SourcePos}}, JS::SetModule{DynamicImport,Metadata}Hook #include "js/OffThreadScriptCompilation.h" diff --git a/dom/script/ScriptSettings.cpp b/dom/script/ScriptSettings.cpp index 005871898e91..6946ef60916a 100644 --- a/dom/script/ScriptSettings.cpp +++ b/dom/script/ScriptSettings.cpp @@ -14,6 +14,7 @@ #include "mozilla/dom/WorkerPrivate.h" #include "jsapi.h" +#include "js/friend/ErrorMessages.h" // JSMSG_OUT_OF_MEMORY #include "js/Warnings.h" // JS::{Get,}WarningReporter #include "xpcpublic.h" #include "nsIGlobalObject.h" diff --git a/dom/system/OSFileConstants.cpp b/dom/system/OSFileConstants.cpp index 7ab0b4c0e7a1..42305e4b4c84 100644 --- a/dom/system/OSFileConstants.cpp +++ b/dom/system/OSFileConstants.cpp @@ -57,6 +57,7 @@ #include "jsapi.h" #include "jsfriendapi.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "BindingUtils.h" // Used to provide information on the OS diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index b851d0e8abdc..1f7ec0322beb 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -22,6 +22,7 @@ #include "mozilla/ipc/BackgroundChild.h" #include "GeckoProfiler.h" #include "jsfriendapi.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/ContextOptions.h" #include "js/LocaleSensitive.h" #include "mozilla/ArrayUtils.h" diff --git a/dom/workers/WorkerError.cpp b/dom/workers/WorkerError.cpp index 2b9f80007c3a..b88eef7993bc 100644 --- a/dom/workers/WorkerError.cpp +++ b/dom/workers/WorkerError.cpp @@ -6,6 +6,7 @@ #include "WorkerError.h" +#include "js/friend/ErrorMessages.h" // JSMSG_OVER_RECURSED #include "mozilla/ArrayAlgorithm.h" #include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/ErrorEvent.h" diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 628af466d52d..b101753bd5ab 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -11,6 +11,7 @@ #include "js/CompilationAndEvaluation.h" #include "js/ContextOptions.h" #include "js/Exception.h" +#include "js/friend/ErrorMessages.h" // JSMSG_OUT_OF_MEMORY #include "js/LocaleSensitive.h" #include "js/MemoryMetrics.h" #include "js/SourceText.h" diff --git a/js/rust/etc/wrapper.hpp b/js/rust/etc/wrapper.hpp index ae61d0148dca..22a335ce73a2 100644 --- a/js/rust/etc/wrapper.hpp +++ b/js/rust/etc/wrapper.hpp @@ -25,6 +25,7 @@ typedef uint32_t HashNumber; #include "js/experimental/JitInfo.h" #include "js/experimental/TypedData.h" #include "js/ForOfIterator.h" +#include "js/friend/ErrorMessages.h" // JSErrNum #include "js/friend/WindowProxy.h" #include "js/Initialization.h" #include "js/MemoryMetrics.h" diff --git a/js/src/builtin/Array.cpp b/js/src/builtin/Array.cpp index aa3ea52aefee..bd47833b5830 100644 --- a/js/src/builtin/Array.cpp +++ b/js/src/builtin/Array.cpp @@ -26,6 +26,7 @@ #include "js/Class.h" #include "js/Conversions.h" #include "js/experimental/JitInfo.h" // JSJitGetterOp, JSJitInfo +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "js/PropertySpec.h" #include "util/Poison.h" diff --git a/js/src/builtin/AtomicsObject.cpp b/js/src/builtin/AtomicsObject.cpp index ae9c7262a63d..d50058183349 100644 --- a/js/src/builtin/AtomicsObject.cpp +++ b/js/src/builtin/AtomicsObject.cpp @@ -27,6 +27,7 @@ #include "jit/AtomicOperations.h" #include "jit/InlinableNatives.h" #include "js/Class.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/Result.h" #include "vm/GlobalObject.h" diff --git a/js/src/builtin/BigInt.cpp b/js/src/builtin/BigInt.cpp index 1d4273899f8b..036c137c5b4f 100644 --- a/js/src/builtin/BigInt.cpp +++ b/js/src/builtin/BigInt.cpp @@ -9,6 +9,7 @@ #include "jsapi.h" #include "gc/Tracer.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/TracingAPI.h" #include "vm/ArrayBufferObject.h" diff --git a/js/src/builtin/DataViewObject.cpp b/js/src/builtin/DataViewObject.cpp index 4ce73ac2411c..53ced0e40df5 100644 --- a/js/src/builtin/DataViewObject.cpp +++ b/js/src/builtin/DataViewObject.cpp @@ -23,6 +23,7 @@ #include "jit/InlinableNatives.h" #include "js/Conversions.h" #include "js/experimental/TypedData.h" // JS_NewDataView +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/Wrapper.h" #include "util/Windows.h" diff --git a/js/src/builtin/Eval.cpp b/js/src/builtin/Eval.cpp index 3c4f6eab0c75..466f7417aa19 100644 --- a/js/src/builtin/Eval.cpp +++ b/js/src/builtin/Eval.cpp @@ -13,6 +13,7 @@ #include "frontend/BytecodeCompilation.h" #include "frontend/CompilationInfo.h" #include "gc/HashUtil.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/JSMEnvironment.h" // JS::NewJSMEnvironment, JS::ExecuteInJSMEnvironment, JS::GetJSMEnvironmentOfScriptedCaller, JS::IsJSMEnvironment #include "js/friend/WindowProxy.h" // js::IsWindowProxy #include "js/SourceText.h" diff --git a/js/src/builtin/FinalizationRegistryObject.cpp b/js/src/builtin/FinalizationRegistryObject.cpp index 7cd867ed49bc..3ec4fccb42a2 100644 --- a/js/src/builtin/FinalizationRegistryObject.cpp +++ b/js/src/builtin/FinalizationRegistryObject.cpp @@ -11,6 +11,7 @@ #include "mozilla/ScopeExit.h" #include "gc/Zone.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "vm/GlobalObject.h" #include "vm/PlainObject.h" // js::PlainObject diff --git a/js/src/builtin/JSON.cpp b/js/src/builtin/JSON.cpp index 5b2e30dfa7f0..2f1a6b82cb89 100644 --- a/js/src/builtin/JSON.cpp +++ b/js/src/builtin/JSON.cpp @@ -18,6 +18,7 @@ #include "builtin/Array.h" #include "builtin/BigInt.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "js/Object.h" // JS::GetBuiltinClass #include "js/PropertySpec.h" diff --git a/js/src/builtin/ModuleObject.cpp b/js/src/builtin/ModuleObject.cpp index 42b113812c07..572fe3958f67 100644 --- a/js/src/builtin/ModuleObject.cpp +++ b/js/src/builtin/ModuleObject.cpp @@ -17,6 +17,7 @@ #include "gc/FreeOp.h" #include "gc/Policy.h" #include "gc/Tracer.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/Modules.h" // JS::GetModulePrivate, JS::ModuleDynamicImportHook #include "js/PropertySpec.h" #include "vm/AsyncFunction.h" diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp index 08f998d4e1c3..0d6f301ca092 100644 --- a/js/src/builtin/Object.cpp +++ b/js/src/builtin/Object.cpp @@ -18,6 +18,7 @@ #include "builtin/SelfHostingDefines.h" #include "frontend/BytecodeCompiler.h" #include "jit/InlinableNatives.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "js/PropertySpec.h" #include "js/UniquePtr.h" diff --git a/js/src/builtin/Promise.cpp b/js/src/builtin/Promise.cpp index d0cc779fd69d..9d923ceb4bcb 100644 --- a/js/src/builtin/Promise.cpp +++ b/js/src/builtin/Promise.cpp @@ -17,6 +17,7 @@ #include "js/Debug.h" #include "js/experimental/JitInfo.h" // JSJitGetterOp, JSJitInfo #include "js/ForOfIterator.h" // JS::ForOfIterator +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "vm/ArrayObject.h" #include "vm/AsyncFunction.h" diff --git a/js/src/builtin/Reflect.cpp b/js/src/builtin/Reflect.cpp index bd224544055b..52d6bdf733dd 100644 --- a/js/src/builtin/Reflect.cpp +++ b/js/src/builtin/Reflect.cpp @@ -9,6 +9,7 @@ #include "builtin/Array.h" #include "jit/InlinableNatives.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_NOT_EXPECTED_TYPE #include "js/PropertySpec.h" #include "vm/ArgumentsObject.h" #include "vm/JSContext.h" diff --git a/js/src/builtin/ReflectParse.cpp b/js/src/builtin/ReflectParse.cpp index af7f20518796..d00a781477ed 100644 --- a/js/src/builtin/ReflectParse.cpp +++ b/js/src/builtin/ReflectParse.cpp @@ -21,6 +21,7 @@ #include "frontend/ParseNode.h" #include "frontend/Parser.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "js/StableStringChars.h" #include "vm/BigIntType.h" diff --git a/js/src/builtin/RegExp.cpp b/js/src/builtin/RegExp.cpp index 5bdbfb37bfe0..2914a98e17df 100644 --- a/js/src/builtin/RegExp.cpp +++ b/js/src/builtin/RegExp.cpp @@ -13,6 +13,7 @@ #include "frontend/TokenStream.h" #include "irregexp/RegExpAPI.h" #include "jit/InlinableNatives.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_NEWREGEXP_FLAGGED #include "js/PropertySpec.h" #include "js/RegExpFlags.h" // JS::RegExpFlag, JS::RegExpFlags #include "util/StringBuffer.h" diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp index f0362c6a40c4..67121cc1ccd1 100644 --- a/js/src/builtin/Stream.cpp +++ b/js/src/builtin/Stream.cpp @@ -21,6 +21,7 @@ #include "builtin/streams/ReadableStreamReader.h" // js::ReadableStream{,Default}Reader, js::CreateReadableStreamDefaultReader, js::ReadableStreamReaderGeneric{Cancel,Initialize,Release}, js::ReadableStreamDefaultReaderRead #include "js/ArrayBuffer.h" // JS::NewArrayBuffer #include "js/experimental/TypedData.h" // JS_GetArrayBufferViewData, JS_NewUint8Array{,WithBuffer} +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "vm/Interpreter.h" #include "vm/JSContext.h" diff --git a/js/src/builtin/String.cpp b/js/src/builtin/String.cpp index 55fd7acc8175..738be6f2be08 100644 --- a/js/src/builtin/String.cpp +++ b/js/src/builtin/String.cpp @@ -32,6 +32,7 @@ #include "builtin/RegExp.h" #include "jit/InlinableNatives.h" #include "js/Conversions.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #if !JS_HAS_INTL_API # include "js/LocaleSensitive.h" diff --git a/js/src/builtin/Symbol.cpp b/js/src/builtin/Symbol.cpp index 3b14aae2593b..f5199d779d58 100644 --- a/js/src/builtin/Symbol.cpp +++ b/js/src/builtin/Symbol.cpp @@ -5,8 +5,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "builtin/Symbol.h" - #include "js/Symbol.h" + +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "util/StringBuffer.h" #include "vm/PlainObject.h" // js::PlainObject diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 3a41108367e9..df29365193af 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -63,6 +63,7 @@ #include "js/experimental/CodeCoverage.h" // js::GetCodeCoverageSummary #include "js/experimental/TypedData.h" // JS_GetObjectAsUint8Array #include "js/friend/DumpFunctions.h" // js::Dump{Backtrace,Heap,Object}, JS::FormatStackDump, js::IgnoreNurseryObjects +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/WindowProxy.h" // js::ToWindowProxyIfWindow #include "js/HashTable.h" #include "js/LocaleSensitive.h" diff --git a/js/src/builtin/WeakMapObject-inl.h b/js/src/builtin/WeakMapObject-inl.h index 6adfde2439d7..a111cab671ce 100644 --- a/js/src/builtin/WeakMapObject-inl.h +++ b/js/src/builtin/WeakMapObject-inl.h @@ -9,6 +9,7 @@ #include "builtin/WeakMapObject.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "vm/ProxyObject.h" #include "gc/WeakMap-inl.h" diff --git a/js/src/builtin/WeakMapObject.cpp b/js/src/builtin/WeakMapObject.cpp index f0ff138afcc7..23b4ed07528c 100644 --- a/js/src/builtin/WeakMapObject.cpp +++ b/js/src/builtin/WeakMapObject.cpp @@ -10,6 +10,7 @@ #include "builtin/WeakSetObject.h" #include "gc/FreeOp.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/PropertySpec.h" #include "vm/JSContext.h" #include "vm/SelfHosting.h" diff --git a/js/src/builtin/WeakRefObject.cpp b/js/src/builtin/WeakRefObject.cpp index 2a8c7462781f..f81963d9ecf3 100644 --- a/js/src/builtin/WeakRefObject.cpp +++ b/js/src/builtin/WeakRefObject.cpp @@ -9,6 +9,8 @@ #include "mozilla/Maybe.h" #include "jsapi.h" + +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "vm/GlobalObject.h" #include "vm/JSContext.h" diff --git a/js/src/builtin/WeakSetObject.cpp b/js/src/builtin/WeakSetObject.cpp index 17f68a13b162..fe19166b815f 100644 --- a/js/src/builtin/WeakSetObject.cpp +++ b/js/src/builtin/WeakSetObject.cpp @@ -9,6 +9,7 @@ #include "jsapi.h" #include "builtin/MapObject.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/PropertySpec.h" #include "vm/GlobalObject.h" #include "vm/Iteration.h" diff --git a/js/src/builtin/intl/CommonFunctions.cpp b/js/src/builtin/intl/CommonFunctions.cpp index f489c165ff4f..f3dcf805220a 100644 --- a/js/src/builtin/intl/CommonFunctions.cpp +++ b/js/src/builtin/intl/CommonFunctions.cpp @@ -14,11 +14,10 @@ #include -#include "jsfriendapi.h" // for GetErrorMessage, JSMSG_INTERNAL_INTL_ERROR - #include "gc/GCEnum.h" #include "gc/Zone.h" #include "gc/ZoneAllocator.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_INTERNAL_INTL_ERROR #include "js/Value.h" #include "unicode/uformattedvalue.h" #include "vm/JSContext.h" diff --git a/js/src/builtin/intl/DateTimeFormat.cpp b/js/src/builtin/intl/DateTimeFormat.cpp index cb6b032d2700..48885918cbca 100644 --- a/js/src/builtin/intl/DateTimeFormat.cpp +++ b/js/src/builtin/intl/DateTimeFormat.cpp @@ -24,6 +24,7 @@ #include "js/CharacterEncoding.h" #include "js/Date.h" #include "js/experimental/Intl.h" // JS::AddMozDateTimeFormatConstructor +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/GCAPI.h" #include "js/PropertySpec.h" #include "js/StableStringChars.h" diff --git a/js/src/builtin/intl/DisplayNames.cpp b/js/src/builtin/intl/DisplayNames.cpp index 3f25c7f9b338..8e3e7aa4c593 100644 --- a/js/src/builtin/intl/DisplayNames.cpp +++ b/js/src/builtin/intl/DisplayNames.cpp @@ -31,6 +31,7 @@ #include "js/CallArgs.h" #include "js/Class.h" #include "js/experimental/Intl.h" // JS::AddMozDateTimeFormatConstructor, JS::AddDisplayNamesConstructor +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/GCVector.h" #include "js/PropertyDescriptor.h" #include "js/PropertySpec.h" diff --git a/js/src/builtin/intl/IntlObject.cpp b/js/src/builtin/intl/IntlObject.cpp index bba4f90b68af..b130a3fa32d1 100644 --- a/js/src/builtin/intl/IntlObject.cpp +++ b/js/src/builtin/intl/IntlObject.cpp @@ -29,6 +29,7 @@ #include "builtin/intl/SharedIntlData.h" #include "js/CharacterEncoding.h" #include "js/Class.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/Result.h" #include "js/StableStringChars.h" diff --git a/js/src/builtin/intl/LanguageTag.cpp b/js/src/builtin/intl/LanguageTag.cpp index a5dc03f098e0..ae771ecfaba7 100644 --- a/js/src/builtin/intl/LanguageTag.cpp +++ b/js/src/builtin/intl/LanguageTag.cpp @@ -28,6 +28,7 @@ #include "builtin/intl/CommonFunctions.h" #include "ds/Sort.h" #include "gc/Tracer.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Result.h" #include "js/TracingAPI.h" #include "js/Utility.h" diff --git a/js/src/builtin/intl/Locale.cpp b/js/src/builtin/intl/Locale.cpp index e05580fe5a42..031741814f82 100644 --- a/js/src/builtin/intl/Locale.cpp +++ b/js/src/builtin/intl/Locale.cpp @@ -29,6 +29,7 @@ #include "builtin/String.h" #include "gc/Rooting.h" #include "js/Conversions.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/TypeDecls.h" #include "js/Wrapper.h" #include "util/StringBuffer.h" diff --git a/js/src/builtin/intl/RelativeTimeFormat.cpp b/js/src/builtin/intl/RelativeTimeFormat.cpp index 539b00341b82..fd83cd34e02e 100644 --- a/js/src/builtin/intl/RelativeTimeFormat.cpp +++ b/js/src/builtin/intl/RelativeTimeFormat.cpp @@ -16,6 +16,7 @@ #include "builtin/intl/ScopedICUObject.h" #include "gc/FreeOp.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "unicode/udisplaycontext.h" #include "unicode/uloc.h" diff --git a/js/src/builtin/streams/MiscellaneousOperations.cpp b/js/src/builtin/streams/MiscellaneousOperations.cpp index 99088d6690f3..633c96ac933f 100644 --- a/js/src/builtin/streams/MiscellaneousOperations.cpp +++ b/js/src/builtin/streams/MiscellaneousOperations.cpp @@ -13,9 +13,9 @@ #include "mozilla/FloatingPoint.h" // mozilla::IsNaN #include "jsapi.h" // JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage #include "js/Conversions.h" // JS::ToNumber +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/RootingAPI.h" // JS::{,Mutable}Handle, JS::Rooted #include "vm/Interpreter.h" // js::{Call,GetAndClearException} #include "vm/JSContext.h" // JSContext diff --git a/js/src/builtin/streams/PipeToState.cpp b/js/src/builtin/streams/PipeToState.cpp index 5591ff722f13..7b5fe2ae7585 100644 --- a/js/src/builtin/streams/PipeToState.cpp +++ b/js/src/builtin/streams/PipeToState.cpp @@ -13,7 +13,6 @@ #include "mozilla/Maybe.h" // mozilla::Maybe, mozilla::Nothing, mozilla::Some #include "jsapi.h" // JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_* #include "builtin/Promise.h" // js::RejectPromiseWithPendingError #include "builtin/streams/ReadableStream.h" // js::ReadableStream @@ -24,6 +23,7 @@ #include "builtin/streams/WritableStreamWriterOperations.h" // js::WritableStreamDefaultWriter{GetDesiredSize,Release,Write} #include "js/CallArgs.h" // JS::CallArgsFromVp, JS::CallArgs #include "js/Class.h" // JSClass, JSCLASS_HAS_RESERVED_SLOTS +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Promise.h" // JS::AddPromiseReactions #include "js/RootingAPI.h" // JS::Handle, JS::Rooted #include "js/Value.h" // JS::{,Int32,Magic,Object}Value, JS::UndefinedHandleValue diff --git a/js/src/builtin/streams/QueueWithSizes.cpp b/js/src/builtin/streams/QueueWithSizes.cpp index 18b8e603ab17..5ee9d23fbeb1 100644 --- a/js/src/builtin/streams/QueueWithSizes.cpp +++ b/js/src/builtin/streams/QueueWithSizes.cpp @@ -17,6 +17,7 @@ #include "builtin/streams/StreamController.h" // js::StreamController #include "js/Class.h" // JSClass, JSCLASS_HAS_RESERVED_SLOTS #include "js/Conversions.h" // JS::ToNumber +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/RootingAPI.h" // JS::Rooted #include "js/Value.h" // JS::Value, JS::{Number,Object}Value #include "vm/Compartment.h" // JSCompartment diff --git a/js/src/builtin/streams/ReadableStream.cpp b/js/src/builtin/streams/ReadableStream.cpp index c0928ee0407e..ed80e4fcb30d 100644 --- a/js/src/builtin/streams/ReadableStream.cpp +++ b/js/src/builtin/streams/ReadableStream.cpp @@ -11,7 +11,6 @@ #include "mozilla/Attributes.h" // MOZ_MUST_USE #include "jsapi.h" // JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_* #include "jspubtd.h" // JSProto_ReadableStream #include "builtin/Array.h" // js::NewDenseFullyAllocatedArray @@ -26,6 +25,7 @@ #include "js/CallArgs.h" // JS::CallArgs{,FromVp} #include "js/Class.h" // JSCLASS_PRIVATE_IS_NSISUPPORTS, JSCLASS_HAS_PRIVATE, JS_NULL_CLASS_OPS #include "js/Conversions.h" // JS::ToBoolean +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" // JS{Function,Property}Spec, JS_FN, JS_PSG, JS_{FS,PS}_END #include "js/RootingAPI.h" // JS::Handle, JS::Rooted, js::CanGC #include "js/Stream.h" // JS::ReadableStream{Mode,UnderlyingSource} diff --git a/js/src/builtin/streams/ReadableStreamBYOBReader.cpp b/js/src/builtin/streams/ReadableStreamBYOBReader.cpp index fc236b07f62d..a55ea07fe579 100644 --- a/js/src/builtin/streams/ReadableStreamBYOBReader.cpp +++ b/js/src/builtin/streams/ReadableStreamBYOBReader.cpp @@ -15,10 +15,10 @@ #include "mozilla/Attributes.h" // MOZ_MUST_USE #include "jsapi.h" // JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_* #include "builtin/streams/ReadableStream.h" // js::ReadableStream #include "builtin/streams/ReadableStreamReader.h" // js::CreateReadableStreamBYOBReader, js::ForAuthorCodeBool +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* using JS::Handle; diff --git a/js/src/builtin/streams/ReadableStreamDefaultController.cpp b/js/src/builtin/streams/ReadableStreamDefaultController.cpp index f4d15a80c58e..9c593ee6bf15 100644 --- a/js/src/builtin/streams/ReadableStreamDefaultController.cpp +++ b/js/src/builtin/streams/ReadableStreamDefaultController.cpp @@ -10,7 +10,7 @@ #include "mozilla/Attributes.h" // MOZ_MUST_USE #include "jsapi.h" // JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_*, js::AssertSameCompartment +#include "jsfriendapi.h" // js::AssertSameCompartment #include "builtin/streams/ClassSpecMacro.h" // JS_STREAMS_CLASS_SPEC #include "builtin/streams/MiscellaneousOperations.h" // js::IsMaybeWrapped @@ -26,6 +26,7 @@ #include "builtin/streams/TeeState.h" // js::TeeState #include "js/ArrayBuffer.h" // JS::NewArrayBuffer #include "js/Class.h" // js::ClassSpec +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "vm/Interpreter.h" #include "vm/JSContext.h" diff --git a/js/src/builtin/streams/ReadableStreamDefaultReader.cpp b/js/src/builtin/streams/ReadableStreamDefaultReader.cpp index d770981a8df3..9a66ec822a61 100644 --- a/js/src/builtin/streams/ReadableStreamDefaultReader.cpp +++ b/js/src/builtin/streams/ReadableStreamDefaultReader.cpp @@ -9,7 +9,6 @@ #include "mozilla/Attributes.h" // MOZ_MUST_USE #include "jsapi.h" // JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage #include "builtin/streams/ClassSpecMacro.h" // JS_STREAMS_CLASS_SPEC #include "builtin/streams/MiscellaneousOperations.h" // js::ReturnPromiseRejectedWithPendingError @@ -17,6 +16,7 @@ #include "builtin/streams/ReadableStreamReader.h" // js::ForAuthorCodeBool, js::ReadableStream{,Default}Reader #include "js/CallArgs.h" // JS::CallArgs{,FromVp} #include "js/Class.h" // JSClass, JS_NULL_CLASS_OPS +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/RootingAPI.h" // JS::Handle, JS::Rooted #include "vm/PromiseObject.h" // js::PromiseObject diff --git a/js/src/builtin/streams/ReadableStreamReader.cpp b/js/src/builtin/streams/ReadableStreamReader.cpp index 4ba1336a9b29..ffbcc3505945 100644 --- a/js/src/builtin/streams/ReadableStreamReader.cpp +++ b/js/src/builtin/streams/ReadableStreamReader.cpp @@ -11,12 +11,13 @@ #include "mozilla/Assertions.h" // MOZ_ASSERT{,_IF} #include "mozilla/Attributes.h" // MOZ_MUST_USE -#include "jsfriendapi.h" // JS_ReportErrorNumberASCII, js::GetErrorMessage +#include "jsfriendapi.h" // JS_ReportErrorNumberASCII #include "builtin/Stream.h" // js::ReadableStreamController, js::ReadableStreamControllerPullSteps #include "builtin/streams/ReadableStream.h" // js::ReadableStream #include "builtin/streams/ReadableStreamController.h" // js::ReadableStreamController #include "builtin/streams/ReadableStreamInternals.h" // js::ReadableStream{Cancel,CreateReadResult} +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/RootingAPI.h" // JS::Handle, JS::Rooted #include "js/Value.h" // JS::Value, JS::UndefinedHandleValue #include "vm/Interpreter.h" // js::GetAndClearException diff --git a/js/src/builtin/streams/StreamAPI.cpp b/js/src/builtin/streams/StreamAPI.cpp index a3062a479df9..61250746341d 100644 --- a/js/src/builtin/streams/StreamAPI.cpp +++ b/js/src/builtin/streams/StreamAPI.cpp @@ -12,7 +12,7 @@ #include // uint32_t, uintptr_t #include "jsapi.h" // js::AssertHeapIsIdle, JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage, js::IsObjectInContextCompartment, JSMSG_* +#include "jsfriendapi.h" // js::IsObjectInContextCompartment #include "jstypes.h" // JS_{FRIEND,PUBLIC}_API #include "builtin/Stream.h" // js::ReadableByteStreamController{,Close}, js::ReadableStreamDefaultController{,Close}, js::StreamController @@ -25,6 +25,7 @@ #include "builtin/streams/StreamController.h" // js::StreamController #include "gc/Zone.h" // JS::Zone #include "js/experimental/TypedData.h" // JS_GetArrayBufferViewData, JS_NewUint8Array +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/GCAPI.h" // JS::AutoCheckCannotGC, JS::AutoSuppressGCAnalysis #include "js/Object.h" // JS::SetPrivate #include "js/RootingAPI.h" // JS::{,Mutable}Handle, JS::Rooted diff --git a/js/src/builtin/streams/WritableStream.cpp b/js/src/builtin/streams/WritableStream.cpp index 1bf38bee8c51..12999030482f 100644 --- a/js/src/builtin/streams/WritableStream.cpp +++ b/js/src/builtin/streams/WritableStream.cpp @@ -12,7 +12,6 @@ #include "mozilla/Attributes.h" // MOZ_MUST_USE #include "jsapi.h" // JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_* #include "jspubtd.h" // JSProto_WritableStream #include "builtin/streams/ClassSpecMacro.h" // JS_STREAMS_CLASS_SPEC @@ -22,6 +21,7 @@ #include "builtin/streams/WritableStreamOperations.h" // js::WritableStream{Abort,Close{,QueuedOrInFlight}} #include "js/CallArgs.h" // JS::CallArgs{,FromVp} #include "js/Class.h" // JS{Function,Property}Spec, JS_{FS,PS}_END, JSCLASS_PRIVATE_IS_NSISUPPORTS, JSCLASS_HAS_PRIVATE, JS_NULL_CLASS_OPS +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/RealmOptions.h" // JS::RealmCreationOptions #include "js/RootingAPI.h" // JS::Handle, JS::Rooted #include "js/Value.h" // JS::{,Object}Value diff --git a/js/src/builtin/streams/WritableStreamDefaultController.cpp b/js/src/builtin/streams/WritableStreamDefaultController.cpp index 2f4f68e0eadf..db31e01b44be 100644 --- a/js/src/builtin/streams/WritableStreamDefaultController.cpp +++ b/js/src/builtin/streams/WritableStreamDefaultController.cpp @@ -13,6 +13,7 @@ #include "builtin/streams/WritableStreamDefaultControllerOperations.h" // js::WritableStreamDefaultControllerError #include "js/CallArgs.h" // JS::CallArgs{,FromVp} #include "js/Class.h" // js::ClassSpec, JS_NULL_CLASS_OPS +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" // JS{Function,Property}Spec, JS_{FS,PS}_END #include "js/Value.h" // JS::Value diff --git a/js/src/builtin/streams/WritableStreamDefaultWriter.cpp b/js/src/builtin/streams/WritableStreamDefaultWriter.cpp index ee271808ffc5..d96156fca8bc 100644 --- a/js/src/builtin/streams/WritableStreamDefaultWriter.cpp +++ b/js/src/builtin/streams/WritableStreamDefaultWriter.cpp @@ -12,7 +12,6 @@ #include "mozilla/Attributes.h" // MOZ_MUST_USE #include "jsapi.h" // JS_ReportErrorASCII, JS_ReportErrorNumberASCII -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_* #include "builtin/streams/ClassSpecMacro.h" // JS_STREAMS_CLASS_SPEC #include "builtin/streams/MiscellaneousOperations.h" // js::ReturnPromiseRejectedWithPendingError @@ -21,6 +20,7 @@ #include "builtin/streams/WritableStreamWriterOperations.h" // js::WritableStreamDefaultWriter{Abort,GetDesiredSize,Release,Write} #include "js/CallArgs.h" // JS::CallArgs{,FromVp} #include "js/Class.h" // js::ClassSpec, JS_NULL_CLASS_OPS +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" // JS{Function,Property}Spec, JS_{FS,PS}_END, JS_{FN,PSG} #include "js/RootingAPI.h" // JS::Handle #include "js/Value.h" // JS::Value diff --git a/js/src/builtin/streams/WritableStreamOperations.cpp b/js/src/builtin/streams/WritableStreamOperations.cpp index 7bd566733d93..f1866508d5ec 100644 --- a/js/src/builtin/streams/WritableStreamOperations.cpp +++ b/js/src/builtin/streams/WritableStreamOperations.cpp @@ -14,7 +14,6 @@ #include // uint32_t #include "jsapi.h" // JS_ReportErrorASCII -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_* #include "builtin/streams/MiscellaneousOperations.h" // js::PromiseRejectedWithPendingError #include "builtin/streams/WritableStream.h" // js::WritableStream @@ -22,6 +21,7 @@ #include "builtin/streams/WritableStreamDefaultControllerOperations.h" // js::WritableStreamControllerErrorSteps #include "builtin/streams/WritableStreamWriterOperations.h" // js::WritableStreamDefaultWriterEnsureReadyPromiseRejected #include "js/CallArgs.h" // JS::CallArgs{,FromVp} +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Promise.h" // JS::{Reject,Resolve}Promise #include "js/RootingAPI.h" // JS::Handle, JS::Rooted #include "js/Value.h" // JS::Value, JS::ObjecValue, JS::UndefinedHandleValue diff --git a/js/src/builtin/streams/WritableStreamWriterOperations.cpp b/js/src/builtin/streams/WritableStreamWriterOperations.cpp index 1d3765857493..e62876e1966c 100644 --- a/js/src/builtin/streams/WritableStreamWriterOperations.cpp +++ b/js/src/builtin/streams/WritableStreamWriterOperations.cpp @@ -12,7 +12,6 @@ #include "mozilla/Attributes.h" // MOZ_MUST_USE #include "jsapi.h" // JS_ReportErrorNumberASCII, JS_ReportErrorASCII -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_* #include "builtin/streams/MiscellaneousOperations.h" // js::PromiseRejectedWithPendingError #include "builtin/streams/WritableStream.h" // js::WritableStream @@ -20,6 +19,7 @@ #include "builtin/streams/WritableStreamDefaultControllerOperations.h" // js::WritableStreamDefaultController{Close,GetDesiredSize} #include "builtin/streams/WritableStreamDefaultWriter.h" // js::WritableStreamDefaultWriter #include "builtin/streams/WritableStreamOperations.h" // js::WritableStream{Abort,CloseQueuedOrInFlight} +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Promise.h" // JS::PromiseState #include "js/Value.h" // JS::Value, JS::{Int32,Null}Value #include "vm/Compartment.h" // JS::Compartment diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index 18d50253f15f..e9db4707687d 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -43,6 +43,7 @@ #include "js/ArrayBuffer.h" // JS::{IsArrayBufferObject,GetArrayBufferData,GetArrayBuffer{ByteLength,Data}} #include "js/CharacterEncoding.h" #include "js/experimental/TypedData.h" // JS_GetArrayBufferView{Type,Data}, JS_GetTypedArrayByteLength, JS_IsArrayBufferViewObject, JS_IsTypedArrayObject +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Object.h" // JS::GetPrivate, JS::GetReservedSlot, JS::SetPrivate #include "js/PropertySpec.h" #include "js/SharedArrayBuffer.h" // JS::{GetSharedArrayBuffer{ByteLength,Data},IsSharedArrayBufferObject} diff --git a/js/src/debugger/Debugger.cpp b/js/src/debugger/Debugger.cpp index 1d722cc003b0..b7fbc0e496fd 100644 --- a/js/src/debugger/Debugger.cpp +++ b/js/src/debugger/Debugger.cpp @@ -26,7 +26,6 @@ #include // for std::move #include "jsapi.h" // for CallArgs, CallArgsFromVp -#include "jsfriendapi.h" // for GetErrorMessage #include "jstypes.h" // for JS_PUBLIC_API #include "builtin/Array.h" // for NewDenseFullyAllocatedArray @@ -62,6 +61,7 @@ #include "jit/RematerializedFrame.h" // for RematerializedFrame #include "js/Conversions.h" // for ToBoolean, ToUint32 #include "js/Debug.h" // for Builder::Object, Builder +#include "js/friend/ErrorMessages.h" // for GetErrorMessage, JSMSG_* #include "js/GCAPI.h" // for GarbageCollectionEvent #include "js/HeapAPI.h" // for ExposeObjectToActiveJS #include "js/Promise.h" // for AutoDebuggerJobQueueInterruption diff --git a/js/src/debugger/DebuggerMemory.cpp b/js/src/debugger/DebuggerMemory.cpp index 876c4a132b7b..69c8180e1ae0 100644 --- a/js/src/debugger/DebuggerMemory.cpp +++ b/js/src/debugger/DebuggerMemory.cpp @@ -17,6 +17,7 @@ #include "gc/Marking.h" #include "js/AllocPolicy.h" #include "js/Debug.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/TracingAPI.h" #include "js/UbiNode.h" diff --git a/js/src/debugger/Environment.cpp b/js/src/debugger/Environment.cpp index 4c8ecf5db620..2683e3c6c7b5 100644 --- a/js/src/debugger/Environment.cpp +++ b/js/src/debugger/Environment.cpp @@ -14,7 +14,6 @@ #include // for move #include "jsapi.h" // for Rooted, CallArgs, MutableHandle -#include "jsfriendapi.h" // for GetErrorMessage, GetPropertyKeys #include "debugger/Debugger.h" // for Env, Debugger, ValueToIdentifier #include "debugger/Object.h" // for DebuggerObject @@ -22,6 +21,7 @@ #include "frontend/BytecodeCompiler.h" // for IsIdentifier #include "gc/Rooting.h" // for RootedDebuggerEnvironment #include "gc/Tracer.h" // for TraceManuallyBarrieredCrossCompartmentEdge +#include "js/friend/ErrorMessages.h" // for GetErrorMessage, JSMSG_* #include "js/HeapAPI.h" // for IsInsideNursery #include "vm/Compartment.h" // for Compartment #include "vm/JSAtom.h" // for Atomize, PinAtom diff --git a/js/src/debugger/Frame.cpp b/js/src/debugger/Frame.cpp index 5eb4e8ba458d..58978b1f4bed 100644 --- a/js/src/debugger/Frame.cpp +++ b/js/src/debugger/Frame.cpp @@ -22,7 +22,6 @@ #include // for std::move #include "jsapi.h" // for CallArgs, Handle -#include "jsfriendapi.h" // for GetErrorMessage #include "jsnum.h" // for Int32ToString #include "builtin/Array.h" // for NewDenseCopiedArray @@ -44,6 +43,7 @@ #include "gc/ZoneAllocator.h" // for AddCellMemory #include "jit/JSJitFrameIter.h" // for InlineFrameIterator #include "jit/RematerializedFrame.h" // for RematerializedFrame +#include "js/friend/ErrorMessages.h" // for GetErrorMessage, JSMSG_* #include "js/Object.h" // for SetReservedSlot #include "js/Proxy.h" // for PrivateValue #include "js/SourceText.h" // for SourceText, SourceOwnership diff --git a/js/src/debugger/NoExecute.cpp b/js/src/debugger/NoExecute.cpp index 8b0625aa44e0..d479c1c2e919 100644 --- a/js/src/debugger/NoExecute.cpp +++ b/js/src/debugger/NoExecute.cpp @@ -11,10 +11,10 @@ #include // for fprintf, stdout #include "jsapi.h" // for Handle -#include "jsfriendapi.h" // for DumpBacktrace, GetErrorMessage #include "debugger/Debugger.h" // for Debugger #include "js/friend/DumpFunctions.h" // for DumpBacktrace +#include "js/friend/ErrorMessages.h" // for GetErrorMessage, JSMSG_DEBUGGEE_WOULD_RUN #include "js/Promise.h" // for AutoDebuggerJobQueueInterruption #include "vm/JSContext.h" // for ProtectedDataContextArg, JSContext #include "vm/JSScript.h" // for JSScript diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp index 7cd45e2e2fc3..2fe039b6084f 100644 --- a/js/src/debugger/Object.cpp +++ b/js/src/debugger/Object.cpp @@ -17,7 +17,6 @@ #include // for move #include "jsapi.h" // for CallArgs, RootedObject, Rooted -#include "jsfriendapi.h" // for GetErrorMessage #include "builtin/Array.h" // for NewDenseCopiedArray #include "builtin/Promise.h" // for PromiseReactionRecordBuilder @@ -31,6 +30,7 @@ #include "gc/Tracer.h" // for TraceManuallyBarrieredCrossCompartmentEdge #include "js/CompilationAndEvaluation.h" // for Compile #include "js/Conversions.h" // for ToObject +#include "js/friend/ErrorMessages.h" // for GetErrorMessage, JSMSG_* #include "js/friend/WindowProxy.h" // for IsWindow, IsWindowProxy, ToWindowIfWindowProxy #include "js/HeapAPI.h" // for IsInsideNursery #include "js/Promise.h" // for PromiseState diff --git a/js/src/debugger/Script.cpp b/js/src/debugger/Script.cpp index 70f030b9b337..72bdf3e95ac9 100644 --- a/js/src/debugger/Script.cpp +++ b/js/src/debugger/Script.cpp @@ -14,7 +14,6 @@ #include // for uint32_t, SIZE_MAX, int32_t #include "jsapi.h" // for CallArgs, Rooted, CallArgsFromVp -#include "jsfriendapi.h" // for GetErrorMessage #include "jsnum.h" // for ToNumber #include "NamespaceImports.h" // for CallArgs, RootedValue @@ -28,6 +27,7 @@ #include "gc/Tracer.h" // for TraceManuallyBarrieredCrossCompartmentEdge #include "gc/Zone.h" // for Zone #include "gc/ZoneAllocator.h" // for AddCellMemory +#include "js/friend/ErrorMessages.h" // for GetErrorMessage, JSMSG_* #include "js/HeapAPI.h" // for GCCellPtr #include "js/Wrapper.h" // for UncheckedUnwrap #include "vm/ArrayObject.h" // for ArrayObject diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 9755446060e5..9aa9ed517b34 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -58,6 +58,7 @@ #include "frontend/TryEmitter.h" // TryEmitter #include "frontend/WhileEmitter.h" // WhileEmitter #include "js/CompileOptions.h" // TransitiveCompileOptions, CompileOptions +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/friend/StackLimits.h" // CheckRecursionLimit #include "util/StringBuffer.h" // StringBuffer #include "vm/AsyncFunctionResolveKind.h" // AsyncFunctionResolveKind diff --git a/js/src/frontend/EmitterScope.cpp b/js/src/frontend/EmitterScope.cpp index ee31c99b578b..d8b749652fbf 100644 --- a/js/src/frontend/EmitterScope.cpp +++ b/js/src/frontend/EmitterScope.cpp @@ -10,6 +10,7 @@ #include "frontend/BytecodeEmitter.h" #include "frontend/ModuleSharedContext.h" #include "frontend/TDZCheckCache.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "vm/GlobalObject.h" using namespace js; diff --git a/js/src/frontend/Frontend2.cpp b/js/src/frontend/Frontend2.cpp index 60b5a865d7e6..b7207621c70f 100644 --- a/js/src/frontend/Frontend2.cpp +++ b/js/src/frontend/Frontend2.cpp @@ -28,6 +28,7 @@ #include "frontend/TokenStream.h" // TokenStreamAnyChars #include "irregexp/RegExpAPI.h" // irregexp::CheckPatternSyntax #include "js/CharacterEncoding.h" // JS::UTF8Chars, UTF8CharsToNewTwoByteCharsZ +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/GCAPI.h" // JS::AutoCheckCannotGC #include "js/HeapAPI.h" // JS::GCCellPtr #include "js/RegExpFlags.h" // JS::RegExpFlag, JS::RegExpFlags diff --git a/js/src/frontend/ParseContext.cpp b/js/src/frontend/ParseContext.cpp index 007df50edc47..f4477247c324 100644 --- a/js/src/frontend/ParseContext.cpp +++ b/js/src/frontend/ParseContext.cpp @@ -5,6 +5,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "frontend/ParseContext-inl.h" + +#include "js/friend/ErrorMessages.h" // JSMSG_* + #include "vm/EnvironmentObject-inl.h" using mozilla::Maybe; diff --git a/js/src/frontend/ParseContext.h b/js/src/frontend/ParseContext.h index 4e4b81a540a9..51cc82387f9f 100644 --- a/js/src/frontend/ParseContext.h +++ b/js/src/frontend/ParseContext.h @@ -15,6 +15,7 @@ #include "frontend/NameCollections.h" #include "frontend/SharedContext.h" #include "frontend/UsedNameTracker.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "vm/GeneratorAndAsyncKind.h" // js::GeneratorKind, js::FunctionAsyncKind #include "vm/GeneratorObject.h" // js::AbstractGeneratorObject::FixedSlotLimit diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index fe35d3025d1e..b8f0b5482dcc 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -47,6 +47,7 @@ #include "frontend/ParseNodeVerify.h" #include "frontend/TokenStream.h" #include "irregexp/RegExpAPI.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/RegExpFlags.h" // JS::RegExpFlags #include "util/StringBuffer.h" // StringBuffer #include "vm/BigIntType.h" diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h index 4bf86cab45c8..5e7010b0327a 100644 --- a/js/src/frontend/Parser.h +++ b/js/src/frontend/Parser.h @@ -187,6 +187,7 @@ #include "frontend/SharedContext.h" #include "frontend/SyntaxParseHandler.h" #include "frontend/TokenStream.h" +#include "js/friend/ErrorMessages.h" // JSErrNum, JSMSG_* #include "js/Vector.h" #include "vm/ErrorReporting.h" #include "vm/GeneratorAndAsyncKind.h" // js::GeneratorKind, js::FunctionAsyncKind diff --git a/js/src/frontend/SwitchEmitter.cpp b/js/src/frontend/SwitchEmitter.cpp index 11c78fddefb0..56d26ed80adf 100644 --- a/js/src/frontend/SwitchEmitter.cpp +++ b/js/src/frontend/SwitchEmitter.cpp @@ -15,6 +15,7 @@ #include "frontend/BytecodeEmitter.h" // BytecodeEmitter #include "frontend/SharedContext.h" // StatementKind +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/TypeDecls.h" // jsbytecode #include "util/BitArray.h" #include "vm/BytecodeUtil.h" // SET_JUMP_OFFSET, JUMP_OFFSET_LEN, SET_RESUMEINDEX diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp index 37a92d6d909e..0972917933ad 100644 --- a/js/src/frontend/TokenStream.cpp +++ b/js/src/frontend/TokenStream.cpp @@ -36,6 +36,7 @@ #include "frontend/ParserAtom.h" #include "frontend/ReservedWords.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Printf.h" // JS_smprintf #include "js/RegExpFlags.h" // JS::RegExpFlags #include "js/UniquePtr.h" diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h index 4b938abb6205..141d4282ceea 100644 --- a/js/src/frontend/TokenStream.h +++ b/js/src/frontend/TokenStream.h @@ -208,6 +208,7 @@ #include "frontend/Token.h" #include "frontend/TokenKind.h" #include "js/CompileOptions.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/HashTable.h" // js::HashMap #include "js/RegExpFlags.h" // JS::RegExpFlags #include "js/UniquePtr.h" diff --git a/js/src/irregexp/RegExpAPI.cpp b/js/src/irregexp/RegExpAPI.cpp index fa1a4ced42b1..1446f149ac9f 100644 --- a/js/src/irregexp/RegExpAPI.cpp +++ b/js/src/irregexp/RegExpAPI.cpp @@ -26,6 +26,7 @@ #include "irregexp/RegExpNativeMacroAssembler.h" #include "irregexp/RegExpShim.h" #include "jit/JitCommon.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/friend/StackLimits.h" // js::ReportOverRecursed #include "util/StringBuffer.h" #include "vm/MatchPairs.h" diff --git a/js/src/jit/BaselineCodeGen.cpp b/js/src/jit/BaselineCodeGen.cpp index 490686d8799a..7b3568c954f7 100644 --- a/js/src/jit/BaselineCodeGen.cpp +++ b/js/src/jit/BaselineCodeGen.cpp @@ -25,6 +25,7 @@ #include "jit/SharedICHelpers.h" #include "jit/TrialInlining.h" #include "jit/VMFunctions.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/UniquePtr.h" #include "vm/AsyncFunction.h" #include "vm/AsyncIteration.h" diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp index 7f1aeeb90c6c..dd152d3eafb0 100644 --- a/js/src/jit/BaselineIC.cpp +++ b/js/src/jit/BaselineIC.cpp @@ -37,6 +37,7 @@ #include "jit/SharedICHelpers.h" #include "jit/VMFunctions.h" #include "js/Conversions.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/GCVector.h" #include "vm/BytecodeIterator.h" #include "vm/BytecodeLocation.h" diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index ec05ce568c39..45e938c66385 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -25,6 +25,7 @@ #include "jit/Lowering.h" #include "jit/MIRGraph.h" #include "js/experimental/JitInfo.h" // JSJitInfo +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/Object.h" // JS::GetReservedSlot #include "js/ScalarType.h" // js::Scalar::Type #include "util/CheckedArithmetic.h" diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 38385cfcfb43..df5a616e897c 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -20,6 +20,7 @@ #include "jit/JitRuntime.h" #include "jit/mips32/Simulator-mips32.h" #include "jit/mips64/Simulator-mips64.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimitWithExtra #include "js/friend/WindowProxy.h" // js::IsWindow #include "js/Printf.h" diff --git a/js/src/jit/WarpBuilder.cpp b/js/src/jit/WarpBuilder.cpp index 98637b90a33e..1c712a1bd003 100644 --- a/js/src/jit/WarpBuilder.cpp +++ b/js/src/jit/WarpBuilder.cpp @@ -17,6 +17,7 @@ #include "jit/MIRGraph.h" #include "jit/WarpCacheIRTranspiler.h" #include "jit/WarpSnapshot.h" +#include "js/friend/ErrorMessages.h" // JSMSG_BAD_CONST_ASSIGN #include "vm/Opcodes.h" #include "jit/JitScript-inl.h" diff --git a/js/src/jsapi-tests/testArrayBuffer.cpp b/js/src/jsapi-tests/testArrayBuffer.cpp index 6a04af16f10a..422d028f30cb 100644 --- a/js/src/jsapi-tests/testArrayBuffer.cpp +++ b/js/src/jsapi-tests/testArrayBuffer.cpp @@ -9,6 +9,7 @@ #include "js/ArrayBuffer.h" // JS::{GetArrayBuffer{ByteLength,Data},IsArrayBufferObject,NewArrayBuffer{,WithContents},StealArrayBufferContents} #include "js/Exception.h" #include "js/experimental/TypedData.h" // JS_New{Int32,Uint8}ArrayWithBuffer +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/MemoryFunctions.h" #include "jsapi-tests/tests.h" diff --git a/js/src/jsapi-tests/testBigInt.cpp b/js/src/jsapi-tests/testBigInt.cpp index 214ff8e0252a..90361e436aaf 100644 --- a/js/src/jsapi-tests/testBigInt.cpp +++ b/js/src/jsapi-tests/testBigInt.cpp @@ -8,13 +8,13 @@ #include #include "jsapi.h" // JS_IsExceptionPending, JS_StringEqualsLiteral -#include "jsfriendapi.h" // JSMSG_BIGINT_INVALID_SYNTAX #include "js/BigInt.h" // JS::{,Number,String,SimpleString}ToBigInt, JS::ToBig{I,Ui}nt64 #include "js/CharacterEncoding.h" // JS::Const{Latin1,TwoByte}Chars #include "js/Conversions.h" // JS::ToString #include "js/ErrorReport.h" // JS::ErrorReportBuilder, JSEXN_SYNTAXERR #include "js/Exception.h" // JS::StealPendingExceptionStack +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/RootingAPI.h" // JS::Rooted #include "js/Value.h" // JS::FalseValue, JS::Value diff --git a/js/src/jsapi-tests/testCompileUtf8.cpp b/js/src/jsapi-tests/testCompileUtf8.cpp index 58556aec673d..8d5a0034e9c5 100644 --- a/js/src/jsapi-tests/testCompileUtf8.cpp +++ b/js/src/jsapi-tests/testCompileUtf8.cpp @@ -13,6 +13,7 @@ #include "js/CharacterEncoding.h" #include "js/CompilationAndEvaluation.h" // JS::Compile #include "js/Exception.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/SourceText.h" #include "jsapi-tests/tests.h" #include "vm/ErrorReporting.h" diff --git a/js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp b/js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp index d28beca61a3e..e6e6b9abd7ed 100644 --- a/js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp +++ b/js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp @@ -13,6 +13,7 @@ #include "js/CharacterEncoding.h" #include "js/CompilationAndEvaluation.h" // JS::Compile #include "js/Exception.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/SourceText.h" #include "jsapi-tests/tests.h" #include "vm/ErrorReporting.h" diff --git a/js/src/jsapi-tests/testParseJSON.cpp b/js/src/jsapi-tests/testParseJSON.cpp index e370144721d3..29016ae73900 100644 --- a/js/src/jsapi-tests/testParseJSON.cpp +++ b/js/src/jsapi-tests/testParseJSON.cpp @@ -10,6 +10,7 @@ #include "js/Array.h" // JS::IsArrayObject #include "js/Exception.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/JSON.h" #include "js/MemoryFunctions.h" #include "js/Printf.h" diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 853bd0eced1f..ffe4a74ec996 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -55,6 +55,7 @@ #include "js/ContextOptions.h" // JS::ContextOptions{,Ref} #include "js/Conversions.h" #include "js/Date.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckSystemRecursionLimit #include "js/Initialization.h" #include "js/JSON.h" diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp index d4553afee233..1b4e13d47279 100644 --- a/js/src/jsdate.cpp +++ b/js/src/jsdate.cpp @@ -35,6 +35,7 @@ #include "js/Conversions.h" #include "js/Date.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/LocaleSensitive.h" #include "js/Object.h" // JS::GetBuiltinClass #include "js/PropertySpec.h" diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp index ecf35b262d9b..418e06b19624 100644 --- a/js/src/jsexn.cpp +++ b/js/src/jsexn.cpp @@ -31,6 +31,7 @@ #include "js/ErrorReport.h" // JS::PrintError #include "js/Exception.h" // JS::ExceptionStack #include "js/experimental/TypedData.h" // JS_IsArrayBufferViewObject +#include "js/friend/ErrorMessages.h" // JSErrNum, js::GetErrorMessage, JSMSG_* #include "js/Object.h" // JS::GetBuiltinClass #include "js/SavedFrameAPI.h" #include "js/UniquePtr.h" diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp index fac577a2122c..3e267f18d4a5 100644 --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -22,6 +22,7 @@ #include "js/CharacterEncoding.h" #include "js/experimental/CodeCoverage.h" #include "js/experimental/Intl.h" // JS::Add{,Moz}DisplayNamesConstructor, JS::AddMozDateTimeFormatConstructor +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // JS_STACK_GROWTH_DIRECTION #include "js/friend/WindowProxy.h" // js::ToWindowIfWindowProxy #include "js/Object.h" // JS::GetClass diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h index 6a7203a2c2a1..670bb3acf77c 100644 --- a/js/src/jsfriendapi.h +++ b/js/src/jsfriendapi.h @@ -17,7 +17,6 @@ #include "js/Class.h" #include "js/ErrorReport.h" #include "js/Exception.h" -#include "js/friend/ErrorMessages.h" #include "js/HeapAPI.h" #include "js/Object.h" // JS::GetClass #include "js/shadow/Function.h" // JS::shadow::Function diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index f064f8eda82c..80a597d33e3e 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -30,6 +30,7 @@ #include "jit/InlinableNatives.h" #include "js/CharacterEncoding.h" #include "js/Conversions.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #if !JS_HAS_INTL_API # include "js/LocaleSensitive.h" #endif diff --git a/js/src/jsnum.h b/js/src/jsnum.h index bea4c7c6e4c9..de1d0c137ce2 100644 --- a/js/src/jsnum.h +++ b/js/src/jsnum.h @@ -14,7 +14,7 @@ #include "NamespaceImports.h" #include "js/Conversions.h" -#include "js/friend/ErrorMessages.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "vm/StringType.h" diff --git a/js/src/proxy/BaseProxyHandler.cpp b/js/src/proxy/BaseProxyHandler.cpp index 59cda88fe4c4..66574cc12fb3 100644 --- a/js/src/proxy/BaseProxyHandler.cpp +++ b/js/src/proxy/BaseProxyHandler.cpp @@ -6,6 +6,7 @@ #include "NamespaceImports.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Proxy.h" #include "proxy/DeadObjectProxy.h" #include "vm/ProxyObject.h" diff --git a/js/src/proxy/DeadObjectProxy.cpp b/js/src/proxy/DeadObjectProxy.cpp index cecbc6778e99..63f8881f54d5 100644 --- a/js/src/proxy/DeadObjectProxy.cpp +++ b/js/src/proxy/DeadObjectProxy.cpp @@ -8,6 +8,7 @@ #include "jsapi.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "vm/JSFunction.h" // XXXefaust Bug 1064662 #include "vm/ProxyObject.h" diff --git a/js/src/proxy/OpaqueCrossCompartmentWrapper.cpp b/js/src/proxy/OpaqueCrossCompartmentWrapper.cpp index a98cbae21c79..b9dee324f6e2 100644 --- a/js/src/proxy/OpaqueCrossCompartmentWrapper.cpp +++ b/js/src/proxy/OpaqueCrossCompartmentWrapper.cpp @@ -4,6 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Wrapper.h" #include "vm/JSObject-inl.h" diff --git a/js/src/proxy/Proxy.cpp b/js/src/proxy/Proxy.cpp index 539905030003..c90ec83aaff1 100644 --- a/js/src/proxy/Proxy.cpp +++ b/js/src/proxy/Proxy.cpp @@ -12,6 +12,7 @@ #include "jsapi.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit, js::GetNativeStackLimit #include "js/friend/WindowProxy.h" // js::IsWindow, js::IsWindowProxy, js::ToWindowProxyIfWindow #include "js/PropertySpec.h" diff --git a/js/src/proxy/ScriptedProxyHandler.cpp b/js/src/proxy/ScriptedProxyHandler.cpp index 80f83f0e16de..ff1fd26cdc7c 100644 --- a/js/src/proxy/ScriptedProxyHandler.cpp +++ b/js/src/proxy/ScriptedProxyHandler.cpp @@ -9,6 +9,7 @@ #include "jsapi.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertyDescriptor.h" // JS::FromPropertyDescriptor #include "vm/EqualityOperations.h" // js::SameValue #include "vm/JSFunction.h" diff --git a/js/src/proxy/SecurityWrapper.cpp b/js/src/proxy/SecurityWrapper.cpp index f95e24baae35..1b8ce9677c32 100644 --- a/js/src/proxy/SecurityWrapper.cpp +++ b/js/src/proxy/SecurityWrapper.cpp @@ -8,6 +8,7 @@ #include "jsfriendapi.h" #include "NamespaceImports.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/Wrapper.h" #include "vm/JSObject.h" #include "vm/StringType.h" diff --git a/js/src/proxy/Wrapper.cpp b/js/src/proxy/Wrapper.cpp index 259f66a13b7d..95acbbca98e2 100644 --- a/js/src/proxy/Wrapper.cpp +++ b/js/src/proxy/Wrapper.cpp @@ -8,6 +8,7 @@ #include "jsexn.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/WindowProxy.h" // js::IsWindowProxy #include "js/Object.h" // JS::GetBuiltinClass #include "js/Proxy.h" diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 8cc1e4438123..5927cc4f5740 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -113,6 +113,7 @@ #include "js/experimental/SourceHook.h" // js::{Set,Forget,}SourceHook #include "js/experimental/TypedData.h" // JS_NewUint8Array #include "js/friend/DumpFunctions.h" // JS::FormatStackDump +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimitConservative #include "js/friend/WindowProxy.h" // js::IsWindowProxy, js::SetWindowProxyClass, js::ToWindowProxyIfWindow, js::ToWindowIfWindowProxy #include "js/GCAPI.h" // JS::AutoCheckCannotGC diff --git a/js/src/util/CompleteFile.cpp b/js/src/util/CompleteFile.cpp index a04e21df050b..7dca05feab2a 100644 --- a/js/src/util/CompleteFile.cpp +++ b/js/src/util/CompleteFile.cpp @@ -11,7 +11,8 @@ #include // stat, fstat #include "jsapi.h" // JS_ReportErrorNumberLatin1 -#include "jsfriendapi.h" // js::GetErrorMessage, JSMSG_CANT_OPEN + +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_CANT_OPEN bool js::ReadCompleteFile(JSContext* cx, FILE* fp, FileContents& buffer) { /* Get the complete length of the file, if possible. */ diff --git a/js/src/util/StringBuffer.cpp b/js/src/util/StringBuffer.cpp index 101632b78a30..cce1c24c3b0f 100644 --- a/js/src/util/StringBuffer.cpp +++ b/js/src/util/StringBuffer.cpp @@ -13,6 +13,7 @@ #include #include "frontend/ParserAtom.h" // frontend::ParserAtom, frontend::ParserAtomsTable +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "vm/JSObject-inl.h" #include "vm/StringType-inl.h" diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp index 490f9f29b38d..a5bb7ff68629 100644 --- a/js/src/vm/ArrayBufferObject.cpp +++ b/js/src/vm/ArrayBufferObject.cpp @@ -41,6 +41,7 @@ #include "js/ArrayBuffer.h" #include "js/Conversions.h" #include "js/experimental/TypedData.h" // JS_IsArrayBufferViewObject +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/MemoryMetrics.h" #include "js/PropertySpec.h" #include "js/SharedArrayBuffer.h" diff --git a/js/src/vm/AsyncIteration.cpp b/js/src/vm/AsyncIteration.cpp index 8e5ce41dfc63..68aa96dc8c72 100644 --- a/js/src/vm/AsyncIteration.cpp +++ b/js/src/vm/AsyncIteration.cpp @@ -9,6 +9,7 @@ #include "builtin/Array.h" #include "builtin/Promise.h" // js::AsyncFromSyncIteratorMethod, js::AsyncGeneratorEnqueue +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "vm/FunctionFlags.h" // js::FunctionFlags #include "vm/GeneratorObject.h" diff --git a/js/src/vm/BigIntType.cpp b/js/src/vm/BigIntType.cpp index 052265e6cf42..e69c520dde96 100644 --- a/js/src/vm/BigIntType.cpp +++ b/js/src/vm/BigIntType.cpp @@ -102,6 +102,7 @@ #include "gc/Allocator.h" #include "js/BigInt.h" #include "js/Conversions.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Initialization.h" #include "js/StableStringChars.h" #include "js/Utility.h" diff --git a/js/src/vm/BytecodeUtil.cpp b/js/src/vm/BytecodeUtil.cpp index db6cc11a89de..edf6f0df300e 100644 --- a/js/src/vm/BytecodeUtil.cpp +++ b/js/src/vm/BytecodeUtil.cpp @@ -35,6 +35,7 @@ #include "js/CharacterEncoding.h" #include "js/experimental/CodeCoverage.h" #include "js/friend/DumpFunctions.h" // js::DumpPC, js::DumpScript +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Printf.h" #include "js/Symbol.h" #include "util/Memory.h" diff --git a/js/src/vm/CharacterEncoding.cpp b/js/src/vm/CharacterEncoding.cpp index aa163185b17f..3eb98f68546b 100644 --- a/js/src/vm/CharacterEncoding.cpp +++ b/js/src/vm/CharacterEncoding.cpp @@ -16,6 +16,7 @@ #include #include +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "util/StringBuffer.h" #include "util/Unicode.h" // unicode::REPLACEMENT_CHARACTER #include "vm/JSContext.h" diff --git a/js/src/vm/Compartment-inl.h b/js/src/vm/Compartment-inl.h index b5216d0ed96d..fcf2cccdc2c0 100644 --- a/js/src/vm/Compartment-inl.h +++ b/js/src/vm/Compartment-inl.h @@ -17,6 +17,7 @@ #include "gc/Barrier.h" #include "gc/Marking.h" #include "js/CallArgs.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Wrapper.h" #include "vm/Iteration.h" #include "vm/JSObject.h" diff --git a/js/src/vm/CompilationAndEvaluation.cpp b/js/src/vm/CompilationAndEvaluation.cpp index 9f753744f5df..dc21ad6c70c1 100644 --- a/js/src/vm/CompilationAndEvaluation.cpp +++ b/js/src/vm/CompilationAndEvaluation.cpp @@ -14,7 +14,6 @@ #include // std::move -#include "jsfriendapi.h" // js::GetErrorMessage #include "jstypes.h" // JS_PUBLIC_API #include "frontend/BytecodeCompilation.h" // frontend::CompileGlobalScript @@ -23,6 +22,7 @@ #include "frontend/ParseContext.h" // frontend::UsedNameTracker #include "frontend/Parser.h" // frontend::Parser, frontend::ParseGoal #include "js/CharacterEncoding.h" // JS::UTF8Chars, JS::UTF8CharsToNewTwoByteCharsZ +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/RootingAPI.h" // JS::Rooted #include "js/SourceText.h" // JS::SourceText #include "js/TypeDecls.h" // JS::HandleObject, JS::MutableHandleScript diff --git a/js/src/vm/EnvironmentObject.cpp b/js/src/vm/EnvironmentObject.cpp index c0ebd7381160..7084dbb24def 100644 --- a/js/src/vm/EnvironmentObject.cpp +++ b/js/src/vm/EnvironmentObject.cpp @@ -8,6 +8,7 @@ #include "builtin/ModuleObject.h" #include "gc/Policy.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "js/friend/WindowProxy.h" // js::IsWindow, js::IsWindowProxy #include "vm/ArgumentsObject.h" diff --git a/js/src/vm/ErrorObject.cpp b/js/src/vm/ErrorObject.cpp index 0ecba65e83a7..d7e4f661fbd4 100644 --- a/js/src/vm/ErrorObject.cpp +++ b/js/src/vm/ErrorObject.cpp @@ -31,6 +31,7 @@ #include "js/Conversions.h" #include "js/ErrorReport.h" #include "js/ForOfIterator.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "js/PropertySpec.h" #include "js/RootingAPI.h" diff --git a/js/src/vm/ErrorReporting.cpp b/js/src/vm/ErrorReporting.cpp index 14214d56ddf9..105340ee9956 100644 --- a/js/src/vm/ErrorReporting.cpp +++ b/js/src/vm/ErrorReporting.cpp @@ -12,6 +12,7 @@ #include "jsexn.h" #include "jsfriendapi.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Printf.h" // JS_vsmprintf #include "js/Warnings.h" // JS::WarningReporter #include "vm/GlobalObject.h" diff --git a/js/src/vm/ForOfIterator.cpp b/js/src/vm/ForOfIterator.cpp index d883f4def5e8..14ae07613227 100644 --- a/js/src/vm/ForOfIterator.cpp +++ b/js/src/vm/ForOfIterator.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "js/ForOfIterator.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "vm/Interpreter.h" #include "vm/JSContext.h" #include "vm/JSObject.h" diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp index bb661440e228..559e6134bcba 100644 --- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -44,6 +44,7 @@ #include "builtin/WeakSetObject.h" #include "debugger/DebugAPI.h" #include "gc/FreeOp.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/WindowProxy.h" // js::ToWindowProxyIfWindow #include "js/ProtoKey.h" #include "vm/AsyncFunction.h" diff --git a/js/src/vm/Interpreter-inl.h b/js/src/vm/Interpreter-inl.h index 991eb18bf047..4d45bd8b9b1b 100644 --- a/js/src/vm/Interpreter-inl.h +++ b/js/src/vm/Interpreter-inl.h @@ -12,6 +12,7 @@ #include "jsnum.h" #include "jit/Ion.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "vm/ArgumentsObject.h" #include "vm/BytecodeUtil.h" // JSDVG_SEARCH_STACK #include "vm/Realm.h" diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp index f2e3d4ecdf49..3031592d1f50 100644 --- a/js/src/vm/Interpreter.cpp +++ b/js/src/vm/Interpreter.cpp @@ -35,6 +35,7 @@ #include "jit/JitRuntime.h" #include "js/CharacterEncoding.h" #include "js/experimental/JitInfo.h" // JSJitInfo +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "js/friend/WindowProxy.h" // js::IsWindowProxy #include "util/CheckedArithmetic.h" diff --git a/js/src/vm/Iteration.cpp b/js/src/vm/Iteration.cpp index d071e4e71cfd..0a30449ba1d6 100644 --- a/js/src/vm/Iteration.cpp +++ b/js/src/vm/Iteration.cpp @@ -26,6 +26,7 @@ #include "ds/Sort.h" #include "gc/FreeOp.h" #include "gc/Marking.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/Proxy.h" #include "util/Poison.h" diff --git a/js/src/vm/JSAtom.cpp b/js/src/vm/JSAtom.cpp index 9f9a131895a8..fe4ffe0042c8 100644 --- a/js/src/vm/JSAtom.cpp +++ b/js/src/vm/JSAtom.cpp @@ -23,6 +23,7 @@ #include "gc/Marking.h" #include "gc/MaybeRooted.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Symbol.h" #include "util/Text.h" #include "vm/JSContext.h" diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp index 1d4ee7094ae8..1e26f2d0de97 100644 --- a/js/src/vm/JSContext.cpp +++ b/js/src/vm/JSContext.cpp @@ -43,6 +43,7 @@ #include "jit/Simulator.h" #include "js/CharacterEncoding.h" #include "js/ContextOptions.h" // JS::ContextOptions +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::ReportOverRecursed #include "js/Printf.h" #include "util/DiagnosticAssertions.h" diff --git a/js/src/vm/JSFunction.cpp b/js/src/vm/JSFunction.cpp index 05042c1bff3e..363285040cce 100644 --- a/js/src/vm/JSFunction.cpp +++ b/js/src/vm/JSFunction.cpp @@ -36,6 +36,7 @@ #include "jit/Ion.h" #include "js/CallNonGenericMethod.h" #include "js/CompileOptions.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "js/PropertySpec.h" #include "js/Proxy.h" diff --git a/js/src/vm/JSONParser.cpp b/js/src/vm/JSONParser.cpp index ed47ffb4fe43..3604b717112f 100644 --- a/js/src/vm/JSONParser.cpp +++ b/js/src/vm/JSONParser.cpp @@ -14,6 +14,7 @@ #include "jsnum.h" #include "builtin/Array.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "util/StringBuffer.h" #include "vm/Realm.h" diff --git a/js/src/vm/JSObject.cpp b/js/src/vm/JSObject.cpp index 6bd3906d0a03..2fb2ce63e4e4 100644 --- a/js/src/vm/JSObject.cpp +++ b/js/src/vm/JSObject.cpp @@ -37,6 +37,7 @@ #include "jit/BaselineJIT.h" #include "js/CharacterEncoding.h" #include "js/friend/DumpFunctions.h" // js::DumpObject +#include "js/friend/ErrorMessages.h" // JSErrNum, js::GetErrorMessage, JSMSG_* #include "js/friend/WindowProxy.h" // js::IsWindow, js::ToWindowProxyIfWindow #include "js/MemoryMetrics.h" #include "js/PropertyDescriptor.h" // JS::FromPropertyDescriptor diff --git a/js/src/vm/JSObject.h b/js/src/vm/JSObject.h index 2e91990f02b8..82fa24b8e852 100644 --- a/js/src/vm/JSObject.h +++ b/js/src/vm/JSObject.h @@ -11,6 +11,7 @@ #include "gc/Barrier.h" #include "js/Conversions.h" +#include "js/friend/ErrorMessages.h" // JSErrNum #include "js/GCVector.h" #include "js/HeapAPI.h" #include "js/shadow/Zone.h" // JS::shadow::Zone diff --git a/js/src/vm/JSScript.cpp b/js/src/vm/JSScript.cpp index 3d0ad3532e4f..422bd273c0b9 100644 --- a/js/src/vm/JSScript.cpp +++ b/js/src/vm/JSScript.cpp @@ -45,6 +45,7 @@ #include "jit/JitOptions.h" #include "jit/JitRuntime.h" #include "js/CompileOptions.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/MemoryMetrics.h" #include "js/Printf.h" #include "js/SourceText.h" diff --git a/js/src/vm/NativeObject-inl.h b/js/src/vm/NativeObject-inl.h index 52c1e54a269a..52ed9afd5a9d 100644 --- a/js/src/vm/NativeObject-inl.h +++ b/js/src/vm/NativeObject-inl.h @@ -15,6 +15,7 @@ #include "gc/Allocator.h" #include "gc/GCProbes.h" #include "gc/MaybeRooted.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Result.h" #include "proxy/Proxy.h" #include "vm/JSContext.h" diff --git a/js/src/vm/NativeObject.cpp b/js/src/vm/NativeObject.cpp index bd221149fb90..728e0afc0af1 100644 --- a/js/src/vm/NativeObject.cpp +++ b/js/src/vm/NativeObject.cpp @@ -19,6 +19,7 @@ #include "gc/MaybeRooted.h" #include "jit/BaselineIC.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit{,DontReport} #include "js/Result.h" #include "js/Value.h" diff --git a/js/src/vm/Realm.cpp b/js/src/vm/Realm.cpp index 126bc90a3e29..02df3b9491c2 100644 --- a/js/src/vm/Realm.cpp +++ b/js/src/vm/Realm.cpp @@ -21,6 +21,7 @@ #include "jit/JitRealm.h" #include "jit/JitRuntime.h" #include "js/Date.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Proxy.h" #include "js/RootingAPI.h" #include "js/Wrapper.h" diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp index 84e70350d66f..a86b0b68873b 100644 --- a/js/src/vm/RegExpObject.cpp +++ b/js/src/vm/RegExpObject.cpp @@ -17,6 +17,7 @@ #include "frontend/TokenStream.h" #include "gc/HashUtil.h" #include "irregexp/RegExpAPI.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::ReportOverRecursed #include "js/Object.h" // JS::GetBuiltinClass #include "js/RegExp.h" diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 02908d6f0bc5..2ce35f0c0bdb 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -32,6 +32,7 @@ #include "jit/Simulator.h" #include "js/AllocationLogging.h" // JS_COUNT_CTOR, JS_COUNT_DTOR #include "js/Date.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/MemoryMetrics.h" #include "js/SliceBudget.h" #include "js/Wrapper.h" diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp index d49f20d4903d..06ce2ac9c205 100644 --- a/js/src/vm/SavedStacks.cpp +++ b/js/src/vm/SavedStacks.cpp @@ -25,6 +25,7 @@ #include "gc/Policy.h" #include "gc/Rooting.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/SavedFrameAPI.h" #include "js/Vector.h" diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index 12d751329ad9..18341a712268 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -53,6 +53,7 @@ #include "js/ErrorReport.h" // JS::PrintError #include "js/Exception.h" #include "js/experimental/TypedData.h" // JS_GetArrayBufferViewType +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Modules.h" // JS::GetModulePrivate #include "js/PropertySpec.h" #include "js/ScalarType.h" // js::Scalar::Type diff --git a/js/src/vm/SharedArrayObject.cpp b/js/src/vm/SharedArrayObject.cpp index c30ed64312e5..9ebfd693b8b1 100644 --- a/js/src/vm/SharedArrayObject.cpp +++ b/js/src/vm/SharedArrayObject.cpp @@ -13,6 +13,7 @@ #include "gc/FreeOp.h" #include "jit/AtomicOperations.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/SharedArrayBuffer.h" #include "js/Wrapper.h" diff --git a/js/src/vm/Stack.cpp b/js/src/vm/Stack.cpp index f17abb973dd7..b800d9f2aafa 100644 --- a/js/src/vm/Stack.cpp +++ b/js/src/vm/Stack.cpp @@ -19,6 +19,7 @@ #include "gc/Tracer.h" // js::TraceRoot #include "jit/JitcodeMap.h" #include "jit/JitRuntime.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/Value.h" // JS::Value #include "vm/FrameIter.h" // js::FrameIter #include "vm/JSContext.h" diff --git a/js/src/vm/Stack.h b/js/src/vm/Stack.h index 9bfa44f9d6ed..ffab9047bb0a 100644 --- a/js/src/vm/Stack.h +++ b/js/src/vm/Stack.h @@ -18,6 +18,7 @@ #include #include "gc/Rooting.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/RootingAPI.h" #include "js/TypeDecls.h" #include "js/UniquePtr.h" diff --git a/js/src/vm/StringType.cpp b/js/src/vm/StringType.cpp index b83074d4ea8d..95d958a0f3e6 100644 --- a/js/src/vm/StringType.cpp +++ b/js/src/vm/StringType.cpp @@ -32,6 +32,7 @@ #include "gc/MaybeRooted.h" #include "gc/Nursery.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/StableStringChars.h" #include "js/Symbol.h" #include "js/UbiNode.h" diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp index 68a5745da9b7..edb270004692 100644 --- a/js/src/vm/StructuredClone.cpp +++ b/js/src/vm/StructuredClone.cpp @@ -48,6 +48,7 @@ #include "js/ArrayBuffer.h" // JS::{ArrayBufferHasData,DetachArrayBuffer,IsArrayBufferObject,New{,Mapped}ArrayBufferWithContents,ReleaseMappedArrayBufferContents} #include "js/Date.h" #include "js/experimental/TypedData.h" // JS_NewDataView, JS_New{{Ui,I}nt{8,16,32},Float{32,64},Uint8Clamped,Big{Ui,I}nt64}ArrayWithBuffer +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/GCHashTable.h" #include "js/Object.h" // JS::GetBuiltinClass #include "js/RegExpFlags.h" // JS::RegExpFlag, JS::RegExpFlags diff --git a/js/src/vm/ThrowMsgKind.cpp b/js/src/vm/ThrowMsgKind.cpp index 6eb7ee68706d..57faa3714c3d 100644 --- a/js/src/vm/ThrowMsgKind.cpp +++ b/js/src/vm/ThrowMsgKind.cpp @@ -8,7 +8,7 @@ #include "mozilla/Assertions.h" // MOZ_CRASH -#include "jsfriendapi.h" // JSErrNum, JSMSG_* +#include "js/friend/ErrorMessages.h" // JSErrNum, JSMSG_* JSErrNum js::ThrowMsgKindToErrNum(ThrowMsgKind kind) { switch (kind) { diff --git a/js/src/vm/TraceLogging.cpp b/js/src/vm/TraceLogging.cpp index cd310e25eabd..88bbf070e4c0 100644 --- a/js/src/vm/TraceLogging.cpp +++ b/js/src/vm/TraceLogging.cpp @@ -17,6 +17,7 @@ #include "jit/BaselineJIT.h" #include "jit/CompileWrappers.h" #include "jit/JitSpewer.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/Printf.h" #include "js/TraceLoggerAPI.h" #include "threading/LockGuard.h" diff --git a/js/src/vm/TraceLogging.h b/js/src/vm/TraceLogging.h index 8f23f703601e..2ada1dbe4445 100644 --- a/js/src/vm/TraceLogging.h +++ b/js/src/vm/TraceLogging.h @@ -18,6 +18,7 @@ #include "jsfriendapi.h" #include "js/AllocPolicy.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/HashTable.h" #include "js/TraceLoggerAPI.h" #include "js/TypeDecls.h" diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index 48850dfa57de..4de732cdfe49 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -32,6 +32,7 @@ #include "jit/InlinableNatives.h" #include "js/Conversions.h" #include "js/experimental/TypedData.h" // JS_GetArrayBufferViewType, JS_GetTypedArray{Length,ByteOffset,ByteLength}, JS_IsTypedArrayObject +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/ScalarType.h" // js::Scalar::Type #include "js/UniquePtr.h" diff --git a/js/src/vm/UbiNodeCensus.cpp b/js/src/vm/UbiNodeCensus.cpp index be3a50c2632c..4a2de40e3598 100644 --- a/js/src/vm/UbiNodeCensus.cpp +++ b/js/src/vm/UbiNodeCensus.cpp @@ -8,6 +8,7 @@ #include "builtin/MapObject.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "util/Text.h" #include "vm/JSContext.h" #include "vm/PlainObject.h" // js::PlainObject diff --git a/js/src/vm/Warnings.cpp b/js/src/vm/Warnings.cpp index ae8eee4e365a..e6911f9b8f3a 100644 --- a/js/src/vm/Warnings.cpp +++ b/js/src/vm/Warnings.cpp @@ -10,9 +10,9 @@ #include // va_{list,start,end} #include "jsapi.h" // js::AssertHeapIsIdle -#include "jsfriendapi.h" // GetErrorMessage #include "jstypes.h" // JS_PUBLIC_API +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage #include "vm/ErrorReporting.h" // IsWarning #include "vm/JSContext.h" // js::ArgumentsAre{ASCII,Latin1,UTF8}, js::ReportError{Number}VA diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp index 40b4b35003ac..d40d0cd95638 100644 --- a/js/src/wasm/AsmJS.cpp +++ b/js/src/wasm/AsmJS.cpp @@ -40,6 +40,7 @@ #include "frontend/SharedContext.h" // TopLevelFunction #include "gc/Policy.h" #include "js/BuildId.h" // JS::BuildIdCharVector +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/MemoryMetrics.h" #include "js/Printf.h" #include "js/ScalarType.h" // js::Scalar::Type diff --git a/js/src/wasm/TypedObject.cpp b/js/src/wasm/TypedObject.cpp index e7e537ced76f..f61e4697cb45 100644 --- a/js/src/wasm/TypedObject.cpp +++ b/js/src/wasm/TypedObject.cpp @@ -13,6 +13,7 @@ #include "gc/Marking.h" #include "js/CharacterEncoding.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/PropertySpec.h" #include "js/ScalarType.h" // js::Scalar::Type #include "js/Vector.h" diff --git a/js/src/wasm/WasmBuiltins.cpp b/js/src/wasm/WasmBuiltins.cpp index 02ba699cef7a..bac480f82a89 100644 --- a/js/src/wasm/WasmBuiltins.cpp +++ b/js/src/wasm/WasmBuiltins.cpp @@ -30,6 +30,7 @@ #include "jit/MacroAssembler.h" #include "jit/Simulator.h" #include "js/experimental/JitInfo.h" // JSJitInfo +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "js/friend/StackLimits.h" // js::CheckRecursionLimit #include "threading/Mutex.h" #include "util/Memory.h" diff --git a/js/src/wasm/WasmInstance.cpp b/js/src/wasm/WasmInstance.cpp index 10b2eff916b8..7c4ebcb9c66c 100644 --- a/js/src/wasm/WasmInstance.cpp +++ b/js/src/wasm/WasmInstance.cpp @@ -32,6 +32,7 @@ #include "jit/JitRuntime.h" #include "jit/JitScript.h" #include "js/ForOfIterator.h" +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "util/StringBuffer.h" #include "util/Text.h" #include "vm/BigIntType.h" diff --git a/js/src/wasm/WasmJS.cpp b/js/src/wasm/WasmJS.cpp index 435c0d5ba843..398eb6f678ac 100644 --- a/js/src/wasm/WasmJS.cpp +++ b/js/src/wasm/WasmJS.cpp @@ -30,13 +30,14 @@ #include "jit/JitOptions.h" #include "jit/JitRuntime.h" #include "jit/Simulator.h" -#include "js/Printf.h" -#include "js/PropertySpec.h" // JS_{PS,FN}{,_END} #if defined(JS_CODEGEN_X64) // Assembler::HasSSE41 # include "jit/x64/Assembler-x64.h" # include "jit/x86-shared/Architecture-x86-shared.h" # include "jit/x86-shared/Assembler-x86-shared.h" #endif +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* +#include "js/Printf.h" +#include "js/PropertySpec.h" // JS_{PS,FN}{,_END} #include "util/StringBuffer.h" #include "util/Text.h" #include "vm/ErrorObject.h" diff --git a/js/src/wasm/WasmModule.cpp b/js/src/wasm/WasmModule.cpp index 995388001eda..00c4341f632b 100644 --- a/js/src/wasm/WasmModule.cpp +++ b/js/src/wasm/WasmModule.cpp @@ -24,6 +24,7 @@ #include "jit/JitOptions.h" #include "js/BuildId.h" // JS::BuildIdCharVector #include "js/experimental/TypedData.h" // JS_NewUint8Array +#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_* #include "threading/LockGuard.h" #include "vm/HelperThreadState.h" // Tier2GeneratorTask #include "vm/PlainObject.h" // js::PlainObject diff --git a/js/src/wasm/WasmTypes.cpp b/js/src/wasm/WasmTypes.cpp index a22e6e91a08b..534f3b9b061a 100644 --- a/js/src/wasm/WasmTypes.cpp +++ b/js/src/wasm/WasmTypes.cpp @@ -18,6 +18,7 @@ #include "wasm/WasmTypes.h" +#include "js/friend/ErrorMessages.h" // JSMSG_* #include "js/Printf.h" #include "util/Memory.h" #include "vm/ArrayBufferObject.h"