Bug 1499150. Add some more ClearDocumentDependentSlots crash instrumentation. r=mccr8
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 15 Oct 2018 14:40:14 -0400
changeset 497087 6b57b7631a5d62bd2fc4cf267f7224f0dac8de58
parent 497086 45ba0943d6661edcc71490910e8cdeaa8326ade2
child 497088 ffb770ed38711114be60f6c2f8f95971b3c6589f
push id9996
push userarchaeopteryx@coole-files.de
push dateThu, 18 Oct 2018 18:37:15 +0000
treeherdermozilla-beta@8efe26839243 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1499150
milestone64.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 1499150. Add some more ClearDocumentDependentSlots crash instrumentation. r=mccr8
dom/bindings/BindingUtils.cpp
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -4211,19 +4211,35 @@ GetPerInterfaceObjectHandle(JSContext* a
    * it's not possible for the object to be gray here.
    */
 
   const JS::Heap<JSObject*>& entrySlot =
     protoAndIfaceCache.EntrySlotMustExist(aSlotId);
   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
 
   if (!entrySlot) {
-    if (aSlotId == prototypes::id::HTMLDocument ||
-        aSlotId == prototypes::id::Document) {
-      MOZ_CRASH("Looks like bug 1488480/1405521, with aCreator failing to create the per-interface object");
+    switch (aSlotId) {
+      case prototypes::id::HTMLDocument: {
+         MOZ_CRASH("Looks like bug 1488480/1405521, with aCreator failing to create HTMLDocument.prototype");
+         break;
+      }
+      case prototypes::id::Document: {
+        MOZ_CRASH("Looks like bug 1488480/1405521, with aCreator failing to create Document.prototype");
+        break;
+      }
+      case prototypes::id::Node: {
+        MOZ_CRASH("Looks like bug 1488480/1405521, with aCreator failing to create Node.prototype");
+        break;
+      }
+      case prototypes::id::EventTarget: {
+        MOZ_CRASH("Looks like bug 1488480/1405521, with aCreator failing to create EventTarget.prototype");
+        break;
+      }
+      default:
+      break;
     }
   }
 
   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
 }
 
 namespace binding_detail {
 bool