Bug 1572147 - Part 2: Remove unused includes from builtin/String.h. r=evilpie
authorAndré Bargull <andre.bargull@gmail.com>
Wed, 07 Aug 2019 20:04:41 +0000
changeset 486870 2c4b730d8f589a9f7559f5b0e3838555efc09678
parent 486869 51f7b87d0e6b9d6503e7c4162c9c54ebc7955ad0
child 486871 9912dd6288bb69697d7f0dfe65de85d547b0252b
push id36409
push userrmaries@mozilla.com
push dateThu, 08 Aug 2019 21:45:31 +0000
treeherdermozilla-central@82ce76b8a96b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersevilpie
bugs1572147
milestone70.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 1572147 - Part 2: Remove unused includes from builtin/String.h. r=evilpie Depends on D41039 Differential Revision: https://phabricator.services.mozilla.com/D41040
js/src/builtin/String.h
js/src/vm/TraceLogging.h
js/src/vm/TraceLoggingTypes.h
--- a/js/src/builtin/String.h
+++ b/js/src/builtin/String.h
@@ -2,34 +2,28 @@
  * vim: set ts=8 sts=2 et sw=2 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/. */
 
 #ifndef builtin_String_h
 #define builtin_String_h
 
-#include "mozilla/HashFunctions.h"
-#include "mozilla/PodOperations.h"
+#include "mozilla/Attributes.h"
 
-#include <stdio.h>
-#include <string.h>
-
-#include "jsutil.h"
 #include "NamespaceImports.h"
 
-#include "gc/Rooting.h"
 #include "js/RootingAPI.h"
-#include "js/UniquePtr.h"
-#include "util/Unicode.h"
-#include "vm/Printer.h"
+#include "js/Value.h"
 
 namespace js {
 
+class ArrayObject;
 class GlobalObject;
+class ObjectGroup;
 
 /* Initialize the String class, returning its prototype object. */
 extern JSObject* InitStringClass(JSContext* cx, Handle<GlobalObject*> global);
 
 extern bool str_fromCharCode(JSContext* cx, unsigned argc, Value* vp);
 
 extern bool str_fromCharCode_one_arg(JSContext* cx, HandleValue code,
                                      MutableHandleValue rval);
@@ -81,17 +75,17 @@ extern MOZ_MUST_USE bool intl_toLocaleLo
  * This function only works #if EXPOSE_INTL_API; if not, it will *crash*.
  * Govern yourself accordingly.
  *
  * Usage: upperCase = intl_toLocaleUpperCase(string, locale)
  */
 extern MOZ_MUST_USE bool intl_toLocaleUpperCase(JSContext* cx, unsigned argc,
                                                 Value* vp);
 
-ArrayObject* StringSplitString(JSContext* cx, HandleObjectGroup group,
+ArrayObject* StringSplitString(JSContext* cx, Handle<ObjectGroup*> group,
                                HandleString str, HandleString sep,
                                uint32_t limit);
 
 JSString* StringFlatReplaceString(JSContext* cx, HandleString string,
                                   HandleString pattern,
                                   HandleString replacement);
 
 JSString* str_replace_string_raw(JSContext* cx, HandleString string,
--- a/js/src/vm/TraceLogging.h
+++ b/js/src/vm/TraceLogging.h
@@ -11,16 +11,17 @@
 #include "mozilla/LinkedList.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Vector.h"
 
 #include <utility>
 
 #include "jsapi.h"
+#include "jsfriendapi.h"
 
 #include "js/AllocPolicy.h"
 #include "js/HashTable.h"
 #include "js/TraceLoggerAPI.h"
 #include "js/TypeDecls.h"
 #include "js/Vector.h"
 #include "threading/LockGuard.h"
 #include "vm/MutexIDs.h"
--- a/js/src/vm/TraceLoggingTypes.h
+++ b/js/src/vm/TraceLoggingTypes.h
@@ -6,16 +6,18 @@
 
 #ifndef TraceLoggingTypes_h
 #define TraceLoggingTypes_h
 
 #include "builtin/String.h"
 
 #include "js/AllocPolicy.h"
 
+class JSLinearString;
+
 // Tree items, meaning they have a start and stop and form a nested tree.
 #define TRACELOGGER_TREE_ITEMS(_)              \
   _(AnnotateScripts)                           \
   _(Baseline)                                  \
   _(BaselineCompilation)                       \
   _(Engine)                                    \
   _(GC)                                        \
   _(GCAllocation)                              \