Bug 761707 followup. Restore an assert that should not have gone away. r=ms2ger
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 08 Jun 2012 17:42:51 -0400
changeset 101013 a7b8279ce16ac933e61fbdd3174db1776ed20ac9
parent 101012 df0e2f44922171203c1ec56343e51086a9562de8
child 101014 ec473a671b9bbe2d7f05e56e9d1036b9b3453062
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersms2ger
bugs761707
milestone16.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 761707 followup. Restore an assert that should not have gone away. r=ms2ger
dom/bindings/BindingUtils.h
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -65,16 +65,18 @@ IsDOMClass(const js::Class* clasp)
 {
   return clasp->flags & JSCLASS_IS_DOMJSCLASS;
 }
 
 template <class T>
 inline T*
 UnwrapDOMObject(JSObject* obj)
 {
+  MOZ_ASSERT(IsDOMClass(JS_GetClass(obj)));
+
   JS::Value val = js::GetReservedSlot(obj, DOM_OBJECT_SLOT);
   // XXXbz/khuey worker code tries to unwrap interface objects (which have
   // nothing here).  That needs to stop.
   // XXX We don't null-check UnwrapObject's result; aren't we going to crash
   // anyway?
   if (val.isUndefined()) {
     return NULL;
   }