From 3a9f12055ab53d57f9e3b2c75ee06cd8f398e3a2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 Oct 2012 23:12:03 -0400 Subject: [PATCH] Bug 800386. Fix getInterface from JS on XMLHttpRequest objects to actually work. r=khuey --- content/base/src/nsXMLHttpRequest.cpp | 2 +- content/base/src/nsXMLHttpRequest.h | 2 +- content/base/test/chrome/Makefile.in | 1 + content/base/test/chrome/test_bug800386.xul | 66 +++++++++++++++++++++ dom/bindings/Bindings.conf | 2 +- 5 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 content/base/test/chrome/test_bug800386.xul diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 9b2ae826b41c..7c8ddd59b9d4 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -3903,7 +3903,7 @@ nsXMLHttpRequest::GetInterface(const nsIID & aIID, void **aResult) } JS::Value -nsXMLHttpRequest::GetInterface(JSContext* aCx, nsIJSIID* aIID, ErrorResult& aRv) +nsXMLHttpRequest::GetInterface(JSContext* aCx, nsIJSID* aIID, ErrorResult& aRv) { const nsID* iid = aIID->GetID(); nsCOMPtr result; diff --git a/content/base/src/nsXMLHttpRequest.h b/content/base/src/nsXMLHttpRequest.h index 2a4e2e860fbf..a498c615ce10 100644 --- a/content/base/src/nsXMLHttpRequest.h +++ b/content/base/src/nsXMLHttpRequest.h @@ -448,7 +448,7 @@ public: } // We need a GetInterface callable from JS for chrome JS - JS::Value GetInterface(JSContext* aCx, nsIJSIID* aIID, ErrorResult& aRv); + JS::Value GetInterface(JSContext* aCx, nsIJSID* aIID, ErrorResult& aRv); // This creates a trusted readystatechange event, which is not cancelable and // doesn't bubble. diff --git a/content/base/test/chrome/Makefile.in b/content/base/test/chrome/Makefile.in index 94cef2f52f36..270aa903f9ac 100644 --- a/content/base/test/chrome/Makefile.in +++ b/content/base/test/chrome/Makefile.in @@ -47,6 +47,7 @@ MOCHITEST_CHROME_FILES = \ test_bug780199.xul \ test_bug780529.xul \ test_csp_bug768029.html \ + test_bug800386.xul \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/content/base/test/chrome/test_bug800386.xul b/content/base/test/chrome/test_bug800386.xul new file mode 100644 index 000000000000..fc8746c85975 --- /dev/null +++ b/content/base/test/chrome/test_bug800386.xul @@ -0,0 +1,66 @@ + + + + + + + diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index b4428c186622..4a782316f931 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -231,7 +231,7 @@ DOMInterfaces = { 'IID': [ { - 'nativeType': 'nsIJSIID', + 'nativeType': 'nsIJSID', 'headerFile': 'xpcjsid.h', }, {