Backout revision 37970af40c4a (bug 1098145) to be able to cleanly backout another patch series a=backout
authorWes Kocher <wkocher@mozilla.com>
Mon, 17 Nov 2014 20:29:49 -0800
changeset 240384 1f1fba261debae4c3b3c06fcf9b42edb3d8dba09
parent 240383 2d0a51ef828dc93013ae7a70bd8af8d9c2518f57
child 240385 d045286cff6e6a6d6e6d2112fde2cd7141f9b615
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1098145
milestone36.0a1
backs out37970af40c4a040a35e81fc3d9ce0132dbe5210b
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
Backout revision 37970af40c4a (bug 1098145) to be able to cleanly backout another patch series a=backout
dom/html/nsBrowserElement.cpp
--- a/dom/html/nsBrowserElement.cpp
+++ b/dom/html/nsBrowserElement.cpp
@@ -336,23 +336,20 @@ already_AddRefed<DOMRequest>
 nsBrowserElement::Download(const nsAString& aUrl,
                            const BrowserElementDownloadOptions& aOptions,
                            ErrorResult& aRv)
 {
   NS_ENSURE_TRUE(IsBrowserElementOrThrow(aRv), nullptr);
   NS_ENSURE_TRUE(IsNotWidgetOrThrow(aRv), nullptr);
 
   nsCOMPtr<nsIDOMDOMRequest> req;
-  nsCOMPtr<nsIXPConnectWrappedJS> wrappedObj = do_QueryInterface(mBrowserElementAPI);
-  MOZ_ASSERT(wrappedObj, "Failed to get wrapped JS from XPCOM component.");
   AutoJSAPI jsapi;
-  jsapi.Init(wrappedObj->GetJSObject());
-  JSContext* cx = jsapi.cx();
-  JS::Rooted<JS::Value> options(cx);
-  if (!ToJSValue(cx, aOptions, &options)) {
+  jsapi.Init();
+  JS::Rooted<JS::Value> options(jsapi.cx());
+  if (!ToJSValue(jsapi.cx(), aOptions, &options)) {
     aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
     return nullptr;
   }
   nsresult rv = mBrowserElementAPI->Download(aUrl, options, getter_AddRefs(req));
 
   if (NS_WARN_IF(NS_FAILED(rv))) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return nullptr;