Bug 1356103 - Part 12: Allow OMT heap writes under Gecko_GetFontMetrics. r=bholley
authorCameron McCormack <cam@mcc.id.au>
Sun, 30 Apr 2017 17:03:15 +0800
changeset 573140 3e84db544489704b44f91bb1e6f939043995d1df
parent 573139 94c0595512731f72d2fbf8ca2594d082a7f4ad58
child 573141 f551425cf9b5dca1b3450a382f68c50d5c782ef0
push id57306
push userbmo:emilio+bugs@crisal.io
push dateFri, 05 May 2017 10:08:55 +0000
reviewersbholley
bugs1356103
milestone55.0a1
Bug 1356103 - Part 12: Allow OMT heap writes under Gecko_GetFontMetrics. r=bholley This isn't great, since although we know that Servo style worker threads have exclusive write access to the main thread heap due to the use of the Servo font metrics Mutex, we don't know that we're not modifying data on the heap that other style worker threads want to read from. MozReview-Commit-ID: CbSzQFkKG95
js/src/devtools/rootAnalysis/analyzeHeapWrites.js
--- a/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
+++ b/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
@@ -320,17 +320,18 @@ function ignoreCallEdge(entry, callee)
     // (possibly to another). Writes on the origin thread are ok.
     if (/::SetName/.test(callee) &&
         /::UnlabeledDispatch/.test(name))
     {
         return true;
     }
 
     // We manually lock here
-    if ("Gecko_nsFont_InitSystem" == name)
+    if (name == "Gecko_nsFont_InitSystem" ||
+        name == "Gecko_GetFontMetrics")
     {
         return true;
     }
 
     return false;
 }
 
 function ignoreContents(entry)