Bug 1568903 - Part 3: Apply include-what-you-use for jsexn and ErrorObject. r=jorendorff
☠☠ backed out by cfe990fab350 ☠ ☠
authorAndré Bargull <andre.bargull@gmail.com>
Tue, 12 Nov 2019 11:12:45 +0000
changeset 502139 27c54b414c35ad96a4319eba9ba2da7782fb37e4
parent 502138 d2b01a1ad0a966ea1cbd871d33ecdad59a7eee68
child 502140 127a44494b67989bfe3afcd02ee48041ca566f16
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1568903
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1568903 - Part 3: Apply include-what-you-use for jsexn and ErrorObject. r=jorendorff Update the #includes after moving the code in part 2. Differential Revision: https://phabricator.services.mozilla.com/D51652
js/src/jsexn.cpp
js/src/jsexn.h
js/src/vm/ErrorObject.cpp
js/src/vm/ErrorObject.h
--- a/js/src/jsexn.cpp
+++ b/js/src/jsexn.cpp
@@ -5,48 +5,57 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * JS standard exception implementation.
  */
 
 #include "jsexn.h"
 
+#include "mozilla/Assertions.h"
 #include "mozilla/ScopeExit.h"
-#include "mozilla/Sprintf.h"
 
+#include <new>
+#include <stdarg.h>
+#include <stdint.h>
+#include <stdio.h>
 #include <string.h>
 #include <utility>
 
 #include "jsapi.h"
-#include "jsnum.h"
+#include "jsfriendapi.h"
 #include "jstypes.h"
 
-#include "gc/FreeOp.h"
-#include "gc/Marking.h"
+#include "gc/Rooting.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
+#include "js/Class.h"
+#include "js/Conversions.h"
 #include "js/UniquePtr.h"
+#include "js/Value.h"
 #include "js/Warnings.h"  // JS::{,Set}WarningReporter
 #include "js/Wrapper.h"
 #include "util/Memory.h"
 #include "util/StringBuffer.h"
+#include "vm/Compartment.h"
 #include "vm/ErrorObject.h"
 #include "vm/FrameIter.h"  // js::NonBuiltinFrameIter
-#include "vm/GlobalObject.h"
+#include "vm/JSAtom.h"
 #include "vm/JSContext.h"
-#include "vm/JSFunction.h"
 #include "vm/JSObject.h"
 #include "vm/JSScript.h"
+#include "vm/Realm.h"
+#include "vm/SavedFrame.h"
 #include "vm/SavedStacks.h"
 #include "vm/SelfHosting.h"
+#include "vm/Stack.h"
 #include "vm/StringType.h"
+#include "vm/SymbolType.h"
 
 #include "vm/ErrorObject-inl.h"
-#include "vm/JSObject-inl.h"
+#include "vm/JSContext-inl.h"
 #include "vm/SavedStacks-inl.h"
 
 using namespace js;
 
 size_t ExtraMallocSize(JSErrorReport* report) {
   if (report->linebuf()) {
     /*
      * Count with null terminator and alignment.
--- a/js/src/jsexn.h
+++ b/js/src/jsexn.h
@@ -6,21 +6,28 @@
 
 /*
  * JS runtime exception classes.
  */
 
 #ifndef jsexn_h
 #define jsexn_h
 
+#include "mozilla/Assertions.h"
+
 #include "jsapi.h"
+#include "jspubtd.h"
+#include "jstypes.h"
 #include "NamespaceImports.h"
 
+#include "js/ErrorReport.h"
+#include "js/RootingAPI.h"
+#include "js/TypeDecls.h"
 #include "js/UniquePtr.h"
-#include "vm/JSContext.h"
+#include "js/Utility.h"
 
 namespace js {
 class ErrorObject;
 
 UniquePtr<JSErrorNotes::Note> CopyErrorNote(JSContext* cx,
                                             JSErrorNotes::Note* note);
 
 UniquePtr<JSErrorReport> CopyErrorReport(JSContext* cx, JSErrorReport* report);
--- a/js/src/vm/ErrorObject.cpp
+++ b/js/src/vm/ErrorObject.cpp
@@ -2,31 +2,62 @@
  * vim: set ts=8 sw=2 et tw=80:
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "vm/ErrorObject-inl.h"
 
-#include "mozilla/Range.h"
+#include "mozilla/Assertions.h"
+#include "mozilla/Attributes.h"
+#include "mozilla/RecordReplay.h"
 
 #include <utility>
 
+#include "jsapi.h"
 #include "jsexn.h"
+#include "jsfriendapi.h"
+#include "jsnum.h"
+#include "jspubtd.h"
+#include "NamespaceImports.h"
 
+#include "gc/AllocKind.h"
+#include "gc/FreeOp.h"
+#include "gc/Rooting.h"
 #include "js/CallArgs.h"
+#include "js/CallNonGenericMethod.h"
 #include "js/CharacterEncoding.h"
+#include "js/Class.h"
+#include "js/Conversions.h"
+#include "js/ErrorReport.h"
+#include "js/PropertySpec.h"
+#include "js/RootingAPI.h"
+#include "js/TypeDecls.h"
+#include "js/Utility.h"
+#include "js/Value.h"
+#include "js/Wrapper.h"
 #include "util/StringBuffer.h"
 #include "vm/GlobalObject.h"
+#include "vm/JSAtom.h"
+#include "vm/JSFunction.h"
+#include "vm/JSObject.h"
+#include "vm/NativeObject.h"
+#include "vm/ObjectGroup.h"
+#include "vm/ObjectOperations.h"
+#include "vm/SavedStacks.h"
 #include "vm/SelfHosting.h"
+#include "vm/Shape.h"
+#include "vm/Stack.h"
 #include "vm/StringType.h"
 
+#include "vm/JSContext-inl.h"
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
+#include "vm/ObjectOperations-inl.h"
 #include "vm/SavedStacks-inl.h"
 #include "vm/Shape-inl.h"
 
 using namespace js;
 
 #define IMPLEMENT_ERROR_PROTO_CLASS(name)                        \
   {                                                              \
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_##name),     \
--- a/js/src/vm/ErrorObject.h
+++ b/js/src/vm/ErrorObject.h
@@ -3,20 +3,32 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 #ifndef vm_ErrorObject_h_
 #define vm_ErrorObject_h_
 
 #include "mozilla/ArrayUtils.h"
+#include "mozilla/Assertions.h"
 
+#include <stdint.h>
+
+#include "jspubtd.h"
+#include "NamespaceImports.h"
+
+#include "gc/Barrier.h"
+#include "js/Class.h"
+#include "js/ErrorReport.h"
+#include "js/RootingAPI.h"
+#include "js/TypeDecls.h"
 #include "js/UniquePtr.h"
+#include "js/Value.h"
+#include "vm/JSObject.h"
 #include "vm/NativeObject.h"
-#include "vm/SavedStacks.h"
 #include "vm/Shape.h"
 
 namespace js {
 
 class ErrorObject : public NativeObject {
   static JSObject* createProto(JSContext* cx, JSProtoKey key);
 
   static JSObject* createConstructor(JSContext* cx, JSProtoKey key);