Bug 1121855 - Fix camera crash. r=aosmond, a=jocheng
authorBecker Hsieh <behsieh@mozilla.com>
Thu, 12 Mar 2015 20:29:00 -0400
changeset 238760 dc091b8cc4293382d150f64c9fe4606c127d6e09
parent 238759 fb52968e0122a7e61961ccc7a6ad58b624aa70ac
child 238761 f15bd4bdff6eca465b60bbf0c4f1079230abc47a
push id766
push userryanvm@gmail.com
push dateMon, 03 Aug 2015 14:07:36 +0000
treeherdermozilla-b2g37_v2_2@f15bd4bdff6e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond, jocheng
bugs1121855
milestone37.0
Bug 1121855 - Fix camera crash. r=aosmond, a=jocheng
dom/camera/DOMCameraControl.cpp
old mode 100644
new mode 100755
--- a/dom/camera/DOMCameraControl.cpp
+++ b/dom/camera/DOMCameraControl.cpp
@@ -302,16 +302,18 @@ nsDOMCameraControl::nsDOMCameraControl(u
   if (NS_FAILED(rv)) {
     mListener->OnUserError(DOMCameraControlListener::kInStartCamera, rv);
   }
 }
 
 nsDOMCameraControl::~nsDOMCameraControl()
 {
   DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
+  /*invoke DOMMdediastream destroy*/
+  Destroy();
 }
 
 JSObject*
 nsDOMCameraControl::WrapObject(JSContext* aCx)
 {
   return CameraControlBinding::Wrap(aCx, this);
 }