Bug 1400460 - *.js, *.py, *.toml, *dbinit
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 02 Oct 2017 16:32:11 +1100
changeset 1308917 0c34a7f1f8b97c08d81a70b79901425f25318b28
parent 1308916 415c9d5ebd82efb7a63292bee833c75cd6b06b73
child 1308918 97d0e6da7ac763051da7759501ba376c943b7f93
push id225207
push usernnethercote@mozilla.com
push dateMon, 02 Oct 2017 05:33:00 +0000
treeherdertry@1635ef137619 [default view] [failures only]
bugs1400460
milestone58.0a1
Bug 1400460 - *.js, *.py, *.toml, *dbinit
.gdbinit
.lldbinit
js/src/devtools/rootAnalysis/analyzeHeapWrites.js
js/src/devtools/rootAnalysis/annotations.js
layout/style/ServoBindings.toml
servo/components/style/gecko/regen_atoms.py
tools/jprof/split-profile.py
--- a/.gdbinit
+++ b/.gdbinit
@@ -81,17 +81,17 @@ def ps
   set $str = $arg0
   if (sizeof(*$str.mData) == 1 && ($str.mFlags & 1) != 0)
     print $str.mData
   else
     pu $str.mData $str.mLength
   end
 end
 
-# Define a "pa" command to display the string value for an nsIAtom
+# Define a "pa" command to display the string value for an nsAtom
 def pa
   set $atom = $arg0
   if (sizeof(*((&*$atom)->mString)) == 2)
     pu (&*$atom)->mString
   end
 end
 
 # define a "pxul" command to display the type of a XUL element from
--- a/.lldbinit
+++ b/.lldbinit
@@ -17,15 +17,15 @@ script topsrcdir = topsrcdir if locals()
 settings set target.inline-breakpoint-strategy always
 
 # Show the dynamic type of an object when using "expr".  This, for example,
 # will show a variable declared as "nsIFrame *" that points to an nsBlockFrame
 # object as being of type "nsBlockFrame *" rather than "nsIFrame *".
 settings set target.prefer-dynamic-value run-target
 
 # Show the string value in atoms.
-type summary add nsIAtom --summary-string "${var.mString}"
+type summary add nsAtom --summary-string "${var.mString}"
 
 # Show the value of text nodes.
 type summary add nsTextNode --summary-string "${var.mText}"
 
 # Dump the current JS stack.
 command alias js expr DumpJSStack()
--- a/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
+++ b/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
@@ -60,17 +60,17 @@ function hasThreadsafeReferenceCounts(en
     // regexp should match some nsISupports-operating function and produce the
     // name of the nsISupports class via exec().
 
     // nsISupports classes which have threadsafe reference counting.
     var whitelist = [
         "nsIRunnable",
 
         // I don't know if these always have threadsafe refcounts.
-        "nsIAtom",
+        "nsAtom",
         "nsIPermissionManager",
         "nsIURI",
     ];
 
     var match = regexp.exec(entry.name);
     return match && nameMatchesArray(match[1], whitelist);
 }
 
--- a/js/src/devtools/rootAnalysis/annotations.js
+++ b/js/src/devtools/rootAnalysis/annotations.js
@@ -172,17 +172,17 @@ var ignoreFunctions = {
     "uint8 NS_IsMainThread()" : true,
 
     // Has an indirect call under it by the name "__f", which seemed too
     // generic to ignore by itself.
     "void* std::_Locale_impl::~_Locale_impl(int32)" : true,
 
     // Bug 1056410 - devirtualization prevents the standard nsISupports::Release heuristic from working
     "uint32 nsXPConnect::Release()" : true,
-    "uint32 nsIAtom::Release()" : true,
+    "uint32 nsAtom::Release()" : true,
 
     // Allocation API
     "malloc": true,
     "calloc": true,
     "realloc": true,
     "free": true,
 
     // FIXME!
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -216,17 +216,17 @@ whitelist-types = [
     "nsCSSValueList_heap",
     "nsCSSValuePair_heap",
     "nsCSSValuePairList",
     "nsCSSValuePairList_heap",
     "nsCSSValueTokenStream",
     "nsCSSValueTriplet_heap",
     "nsCursorImage",
     "nsFont",
-    "nsIAtom",
+    "nsAtom",
     "nsMainThreadPtrHandle",
     "nsMainThreadPtrHolder",
     "nsMargin",
     "nsMediaExpression",
     "nsMediaFeature",
     "nsMediaFeatures",
     "nsMediaList",
     "nsRect",
@@ -454,17 +454,17 @@ structs-types = [
     "nsCSSPropertyIDSet",
     "nsCSSShadowArray",
     "nsCSSUnit",
     "nsCSSValue",
     "nsCSSValueSharedList",
     "nsChangeHint",
     "nsCursorImage",
     "nsFont",
-    "nsIAtom",
+    "nsAtom",
     "nsIURI",
     "nsCompatibility",
     "nsRestyleHint",
     "nsStyleBackground",
     "nsStyleBorder",
     "nsStyleColor",
     "nsStyleColumn",
     "nsStyleContent",
--- a/servo/components/style/gecko/regen_atoms.py
+++ b/servo/components/style/gecko/regen_atoms.py
@@ -37,24 +37,24 @@ def msvc32_symbolify(source, ident):
     # See https://github.com/rust-lang/rust/issues/36097
     return "\\x01?{}@{}@@2PAV{}@@A".format(ident, source.CLASS, source.TYPE)
 
 
 class GkAtomSource:
     PATTERN = re.compile('^(GK_ATOM)\((.+),\s*"(.*)"\)')
     FILE = "include/nsGkAtomList.h"
     CLASS = "nsGkAtoms"
-    TYPE = "nsIAtom"
+    TYPE = "nsAtom"
 
 
 class CSSPseudoElementsAtomSource:
     PATTERN = re.compile('^(CSS_PSEUDO_ELEMENT)\((.+),\s*"(.*)",')
     FILE = "include/nsCSSPseudoElementList.h"
     CLASS = "nsCSSPseudoElements"
-    # NB: nsICSSPseudoElement is effectively the same as a nsIAtom, but we need
+    # NB: nsICSSPseudoElement is effectively the same as a nsAtom, but we need
     # this for MSVC name mangling.
     TYPE = "nsICSSPseudoElement"
 
 
 class CSSAnonBoxesAtomSource:
     PATTERN = re.compile('^(CSS_ANON_BOX|CSS_NON_INHERITING_ANON_BOX|CSS_WRAPPER_ANON_BOX)\((.+),\s*"(.*)"\)')
     FILE = "include/nsCSSAnonBoxList.h"
     CLASS = "nsCSSAnonBoxes"
@@ -158,24 +158,24 @@ class FileAvoidWrite(BytesIO):
     def __enter__(self):
         return self
 
     def __exit__(self, type, value, traceback):
         if not self.closed:
             self.close()
 
 
-IMPORTS = ("\nuse gecko_bindings::structs::nsIAtom;"
+IMPORTS = ("\nuse gecko_bindings::structs::nsAtom;"
            "\nuse string_cache::Atom;\n\n")
 
 ATOM_TEMPLATE = ("            #[link_name = \"{link_name}\"]\n"
                  "            pub static {name}: *mut {type};")
 
 UNSAFE_STATIC = ("#[inline(always)]\n"
-                 "pub unsafe fn atom_from_static(ptr: *mut nsIAtom) -> Atom {\n"
+                 "pub unsafe fn atom_from_static(ptr: *mut nsAtom) -> Atom {\n"
                  "    Atom::from_static(ptr)\n"
                  "}\n\n")
 
 CFG_IF = '''
 cfg_if! {{
     if #[cfg(not(target_env = "msvc"))] {{
         extern {{
 {gnu}
@@ -215,17 +215,17 @@ def write_atom_macro(atoms, file_name):
                                                link_name=func(atom),
                                                type=atom.type()) for atom in atoms])
 
     with FileAvoidWrite(file_name) as f:
         f.write(PRELUDE)
         f.write(IMPORTS)
 
         for source in SOURCES:
-            if source.TYPE != "nsIAtom":
+            if source.TYPE != "nsAtom":
                 f.write("pub enum {} {{}}\n\n".format(source.TYPE))
 
         f.write(UNSAFE_STATIC)
 
         gnu_symbols = get_symbols(Atom.gnu_symbol)
         msvc32_symbols = get_symbols(Atom.msvc32_symbol)
         msvc64_symbols = get_symbols(Atom.msvc64_symbol)
         f.write(CFG_IF.format(gnu=gnu_symbols, msvc32=msvc32_symbols, msvc64=msvc64_symbols))
--- a/tools/jprof/split-profile.py
+++ b/tools/jprof/split-profile.py
@@ -27,17 +27,17 @@
 # This script uses jprof's includes (-i) and excludes (-e) options to
 # split profiles into segments.  It takes as input a single text file,
 # and from that text file creates a series of jprof profiles in the
 # directory the text file is in.
 #
 # The input file format looks like the following:
 #
 #   poll g_main_poll
-#   GetRuleCascade CSSRuleProcessor::GetRuleCascade(nsPresContext *, nsIAtom *)
+#   GetRuleCascade CSSRuleProcessor::GetRuleCascade(nsPresContext *, nsAtom *)
 #   RuleProcessorData RuleProcessorData::RuleProcessorData(nsPresContext *, nsIContent *, nsRuleWalker *, nsCompatibility *)
 #
 # From this input file, the script will construct a profile called
 # jprof-0.html that contains the whole profile, a profile called
 # jprof-1-poll.html that includes only stacks with g_main_poll, a
 # profile called jprof-2-GetRuleCascade.html that includes only stacks
 # that have GetRuleCascade and do not have g_main_poll, a profile called
 # jprof-3-RuleProcessorData.html that includes only stacks that have the