Bug 854001 - Part 2: Remove a null check in bindings code that is no longer needed because workers no longer use a DOMJSClass for prototype objects. r=peterv, r=bent, a=bajaj
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 28 Mar 2013 15:43:33 -0400
changeset 128741 95c8ca26e8bb81d48378974a94a0d3878123e248
parent 128740 90661ab654d71c39da551889898266f3da2b7e7d
child 128742 73965923ad121206d734bb4110309d0027811a38
push id3578
push userryanvm@gmail.com
push dateMon, 01 Apr 2013 14:10:55 +0000
treeherdermozilla-aurora@73965923ad12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv, bent, bajaj
bugs854001
milestone21.0a2
Bug 854001 - Part 2: Remove a null check in bindings code that is no longer needed because workers no longer use a DOMJSClass for prototype objects. r=peterv, r=bent, a=bajaj
dom/bindings/BindingUtils.h
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -98,24 +98,16 @@ MOZ_STATIC_ASSERT(DOM_OBJECT_SLOT == js:
 template <class T>
 inline T*
 UnwrapDOMObject(JSObject* obj)
 {
   MOZ_ASSERT(IsDOMClass(js::GetObjectClass(obj)) || IsDOMProxy(obj),
              "Don't pass non-DOM objects to this function");
 
   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;
-  }
-  
   return static_cast<T*>(val.toPrivate());
 }
 
 inline const DOMClass*
 GetDOMClass(JSObject* obj)
 {
   js::Class* clasp = js::GetObjectClass(obj);
   if (IsDOMClass(clasp)) {