Bug 1356103 - Part 12: Allow OMT heap writes under Gecko_GetFontMetrics. r=bholley draft
authorCameron McCormack <cam@mcc.id.au>
Sun, 30 Apr 2017 17:03:15 +0800
changeset 572584 06d381b8c38e7e31d3b81a90f461a4535390480d
parent 572583 32aea4e726c7a68cf8c97051bb83dc09866d5815
child 627060 d1957a53aa448fcd691183a9c76c39dfee7e0bde
push id57115
push userbmo:cam@mcc.id.au
push dateThu, 04 May 2017 10:01:25 +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)