Back out 8db40a38aeb1 (bug 837917) for test_interfaces.html failures
authorPhil Ringnalda <philringnalda@gmail.com>
Thu, 14 Feb 2013 21:37:37 -0800
changeset 131884 c75dd4eaa3717f9bde695b06b63f2fe14dbbc32e
parent 131883 5cbd883b62b1e14cb929528dcf331c4351b9caf7
child 131885 28f53833ef371525ca0eb00e34ee7b9c17cd5895
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs837917
milestone21.0a1
backs out8db40a38aeb1ebf73bbc42f6ebceb02c5349a89e
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
Back out 8db40a38aeb1 (bug 837917) for test_interfaces.html failures CLOSED TREE
dom/base/DOMCursor.cpp
dom/base/DOMCursor.h
dom/base/DOMRequest.cpp
dom/base/Makefile.in
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/base/nsIDOMDOMCursor.idl
dom/base/nsIDOMDOMRequest.idl
dom/base/test/Makefile.in
dom/base/test/test_domcursor.html
dom/base/test/test_domrequest.html
testing/specialpowers/content/specialpowersAPI.js
deleted file mode 100644
--- a/dom/base/DOMCursor.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "DOMCursor.h"
-#include "nsIDOMClassInfo.h"
-#include "nsError.h"
-
-DOMCI_DATA(DOMCursor, mozilla::dom::DOMCursor)
-
-namespace mozilla {
-namespace dom {
-
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(DOMCursor,
-                                                  DOMRequest)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCallback)
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DOMCursor,
-                                                DOMRequest)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mCallback)
-NS_IMPL_CYCLE_COLLECTION_UNLINK_END
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DOMCursor)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMDOMCursor)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(DOMCursor)
-NS_INTERFACE_MAP_END_INHERITING(DOMRequest)
-
-NS_IMPL_ADDREF_INHERITED(DOMCursor, DOMRequest)
-NS_IMPL_RELEASE_INHERITED(DOMCursor, DOMRequest)
-
-NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(DOMCursor, DOMRequest)
-NS_IMPL_CYCLE_COLLECTION_TRACE_END
-
-DOMCursor::DOMCursor(nsIDOMWindow* aWindow, nsICursorContinueCallback* aCallback)
-  : DOMRequest(aWindow)
-  , mCallback(aCallback)
-  , mFinished(false)
-{
-  MOZ_ASSERT(aCallback);
-}
-
-void
-DOMCursor::Reset()
-{
-  MOZ_ASSERT(!mFinished);
-
-  // Reset the request state so we can FireSuccess() again.
-  if (mRooted) {
-    UnrootResultVal();
-  }
-  mResult = JSVAL_VOID;
-  mDone = false;
-}
-
-void
-DOMCursor::FireDone()
-{
-  Reset();
-  mFinished = true;
-  FireSuccess(JSVAL_VOID);
-}
-
-NS_IMETHODIMP
-DOMCursor::GetDone(bool *aDone)
-{
-  *aDone = mFinished;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-DOMCursor::Continue()
-{
-  // We need to have a result here because we must be in a 'success' state.
-  if (mResult == JSVAL_VOID) {
-    return NS_ERROR_DOM_INVALID_STATE_ERR;
-  }
-
-  Reset();
-  mCallback->HandleContinue();
-
-  return NS_OK;
-}
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/base/DOMCursor.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_domcursor_h__
-#define mozilla_dom_domcursor_h__
-
-#include "nsIDOMDOMCursor.h"
-#include "DOMRequest.h"
-#include "nsCycleCollectionParticipant.h"
-#include "nsCOMPtr.h"
-#include "mozilla/Attributes.h"
-
-namespace mozilla {
-namespace dom {
-
-class DOMCursor : public nsIDOMDOMCursor
-                , public DOMRequest
-{
-public:
-  NS_DECL_ISUPPORTS_INHERITED
-  NS_DECL_NSIDOMDOMCURSOR
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(DOMCursor,
-                                                         DOMRequest)
-
-  DOMCursor() MOZ_DELETE;
-  DOMCursor(nsIDOMWindow* aWindow, nsICursorContinueCallback *aCallback);
-
-  void Reset();
-  void FireDone();
-
-private:
-  nsCOMPtr<nsICursorContinueCallback> mCallback;
-  bool mFinished;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif /* mozilla_dom_domcursor_h__ */
--- a/dom/base/DOMRequest.cpp
+++ b/dom/base/DOMRequest.cpp
@@ -8,21 +8,19 @@
 
 #include "mozilla/Util.h"
 #include "nsDOMClassInfo.h"
 #include "DOMError.h"
 #include "nsEventDispatcher.h"
 #include "nsDOMEvent.h"
 #include "nsContentUtils.h"
 #include "nsThreadUtils.h"
-#include "DOMCursor.h"
 
 using mozilla::dom::DOMRequest;
 using mozilla::dom::DOMRequestService;
-using mozilla::dom::DOMCursor;
 
 DOMRequest::DOMRequest(nsIDOMWindow* aWindow)
   : mResult(JSVAL_VOID)
   , mDone(false)
   , mRooted(false)
 {
   Init(aWindow);
 }
@@ -191,26 +189,17 @@ DOMRequest::UnrootResultVal()
 NS_IMPL_ISUPPORTS1(DOMRequestService, nsIDOMRequestService)
 
 NS_IMETHODIMP
 DOMRequestService::CreateRequest(nsIDOMWindow* aWindow,
                                  nsIDOMDOMRequest** aRequest)
 {
   NS_ENSURE_STATE(aWindow);
   NS_ADDREF(*aRequest = new DOMRequest(aWindow));
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-DOMRequestService::CreateCursor(nsIDOMWindow* aWindow,
-                                nsICursorContinueCallback* aCallback,
-                                nsIDOMDOMCursor** aCursor) {
-  NS_ADDREF(*aCursor = new DOMCursor(aWindow, aCallback));
-
+  
   return NS_OK;
 }
 
 NS_IMETHODIMP
 DOMRequestService::FireSuccess(nsIDOMDOMRequest* aRequest,
                                const jsval& aResult)
 {
   NS_ENSURE_STATE(aRequest);
@@ -312,16 +301,8 @@ DOMRequestService::FireErrorAsync(nsIDOM
   nsCOMPtr<nsIRunnable> asyncTask =
     new FireErrorAsyncTask(static_cast<DOMRequest*>(aRequest), aError);
   if (NS_FAILED(NS_DispatchToMainThread(asyncTask))) {
     NS_WARNING("Failed to dispatch to main thread!");
     return NS_ERROR_FAILURE;
   }
   return NS_OK;
 }
-
-NS_IMETHODIMP
-DOMRequestService::FireDone(nsIDOMDOMCursor* aCursor) {
-  NS_ENSURE_STATE(aCursor);
-  static_cast<DOMCursor*>(aCursor)->FireDone();
-
-  return NS_OK;
-}
--- a/dom/base/Makefile.in
+++ b/dom/base/Makefile.in
@@ -39,17 +39,16 @@ EXTRA_JS_MODULES += \
   DOMRequestHelper.jsm \
   IndexedDBHelper.jsm \
   ObjectWrapper.jsm \
   $(NULL)
 
 XPIDLSRCS = \
   nsIDOMDOMError.idl \
   nsIDOMDOMRequest.idl \
-  nsIDOMDOMCursor.idl \
   nsIEntropyCollector.idl \
   nsIScriptChannel.idl \
   nsISiteSpecificUserAgent.idl \
   $(NULL)
 
 EXPORTS = \
   nsDOMCID.h \
   nsDOMClassInfoClasses.h \
@@ -80,17 +79,16 @@ EXPORTS = \
   nsStructuredCloneContainer.h \
   nsWindowMemoryReporter.h \
   $(NULL)
 
 EXPORTS_NAMESPACES = mozilla/dom
 EXPORTS_mozilla/dom = \
   DOMError.h \
   DOMRequest.h \
-  DOMCursor.h \
   StructuredCloneTags.h \
   ScreenOrientation.h \
   URL.h \
   $(NULL)
 
 CPPSRCS =			\
 	nsBarProps.cpp          \
 	nsDOMException.cpp 	\
@@ -114,17 +112,16 @@ CPPSRCS =			\
 	nsQueryContentEventResult.cpp \
 	nsContentPermissionHelper.cpp \
 	nsStructuredCloneContainer.cpp \
 	nsDOMNavigationTiming.cpp \
 	nsPerformance.cpp	\
 	nsWindowMemoryReporter.cpp \
 	DOMError.cpp \
 	DOMRequest.cpp \
-	DOMCursor.cpp \
 	Navigator.cpp \
 	URL.cpp \
 	$(NULL)
 
 include $(topsrcdir)/dom/dom-config.mk
 
 ifdef MOZ_JSDEBUGGER
 DEFINES += -DMOZ_JSDEBUGGER
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -439,17 +439,16 @@ using mozilla::dom::workers::ResolveWork
 #endif
 
 #include "nsIDOMNavigatorSystemMessages.h"
 #include "DOMCameraManager.h"
 #include "DOMCameraControl.h"
 #include "DOMCameraCapabilities.h"
 #include "DOMError.h"
 #include "DOMRequest.h"
-#include "DOMCursor.h"
 #include "nsIOpenWindowEventDetail.h"
 #include "nsIAsyncScrollEventDetail.h"
 #include "nsIDOMGlobalObjectConstructor.h"
 #include "nsIDOMCanvasRenderingContext2D.h"
 #include "DOMFileHandle.h"
 #include "FileRequest.h"
 #include "LockedFile.h"
 #include "GeneratedEvents.h"
@@ -1089,31 +1088,31 @@ static nsDOMClassInfoData sClassInfoData
   // other SVG classes
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedEnumeration, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedInteger, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedLength, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedNumber, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
+                           DOM_DEFAULT_SCRIPTABLE_FLAGS)    
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedRect, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedString, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGEvent, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGLength, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGNumber, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGRect, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGStringList, nsSVGStringListSH,
-                           ARRAY_SCRIPTABLE_FLAGS)
+                           ARRAY_SCRIPTABLE_FLAGS)    
   NS_DEFINE_CLASSINFO_DATA(SVGZoomEvent, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(HTMLCanvasElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(CanvasGradient, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(CanvasPattern, nsDOMGenericSH,
@@ -1198,20 +1197,20 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(DeviceStorage, nsEventTargetSH,
                            EVENTTARGET_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(DeviceStorageCursor, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(GeoGeolocation, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
-
+  
   NS_DEFINE_CLASSINFO_DATA(GeoPosition, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
-
+                           DOM_DEFAULT_SCRIPTABLE_FLAGS) 
+  
   NS_DEFINE_CLASSINFO_DATA(GeoPositionCoords, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(GeoPositionError, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(MozPowerManager, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
@@ -1263,17 +1262,17 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(TimeRanges, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(MediaStream, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(LocalMediaStream, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 #endif
 
-  // DOM Traversal NodeIterator class
+  // DOM Traversal NodeIterator class  
   NS_DEFINE_CLASSINFO_DATA(NodeIterator, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   // data transfer for drag and drop
   NS_DEFINE_CLASSINFO_DATA(DataTransfer, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(NotifyPaintEvent, nsDOMGenericSH,
@@ -1391,20 +1390,16 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(CameraCapabilities, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(DOMError, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(DOMRequest, nsEventTargetSH,
                            EVENTTARGET_SCRIPTABLE_FLAGS)
-
-  NS_DEFINE_CLASSINFO_DATA(DOMCursor, nsEventTargetSH,
-                           EVENTTARGET_SCRIPTABLE_FLAGS)
-
   NS_DEFINE_CLASSINFO_DATA(OpenWindowEventDetail, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(AsyncScrollEventDetail, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA_WITH_NAME(DOMFileHandle, FileHandle, nsEventTargetSH,
                            EVENTTARGET_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(FileRequest, nsEventTargetSH,
@@ -1707,17 +1702,17 @@ WrapNativeParent(JSContext *cx, JSObject
 {
   // In the common case, |native| is a wrapper cache with an existing wrapper
 #ifdef DEBUG
   nsWrapperCache* cache = nullptr;
   CallQueryInterface(native, &cache);
   NS_PRECONDITION(nativeWrapperCache &&
                   cache == nativeWrapperCache, "What happened here?");
 #endif
-
+  
   JSObject* obj = nativeWrapperCache->GetWrapper();
   if (obj) {
 #ifdef DEBUG
     jsval debugVal;
     nsresult rv = WrapNative(cx, scope, native, nativeWrapperCache, false,
                              &debugVal);
     NS_ASSERTION(NS_SUCCEEDED(rv) && JSVAL_TO_OBJECT(debugVal) == obj,
                  "Unexpected object in nsWrapperCache");
@@ -1986,17 +1981,17 @@ nsDOMClassInfo::RegisterExternalClasses(
     d.mDisabled = _disabled;                                                  \
     static const nsIID *interface_list[] = {
 
 #define DOM_CLASSINFO_MAP_BEGIN(_class, _interface)                           \
   _DOM_CLASSINFO_MAP_BEGIN(_class, &NS_GET_IID(_interface), true, false)
 
 #define DOM_CLASSINFO_MAP_BEGIN_MAYBE_DISABLE(_class, _interface, _disable)   \
   _DOM_CLASSINFO_MAP_BEGIN(_class, &NS_GET_IID(_interface), true, _disable)
-
+  
 #define DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(_class, _interface)               \
   _DOM_CLASSINFO_MAP_BEGIN(_class, &NS_GET_IID(_interface), false, false)
 
 #define DOM_CLASSINFO_MAP_ENTRY(_if)                                          \
       &NS_GET_IID(_if),
 
 #define DOM_CLASSINFO_MAP_CONDITIONAL_ENTRY(_if, _cond)                       \
       (_cond) ? &NS_GET_IID(_if) : nullptr,
@@ -2298,17 +2293,17 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_BEGIN(MutationEvent, nsIDOMMutationEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMMutationEvent)
     DOM_CLASSINFO_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(UIEvent, nsIDOMUIEvent)
     DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
-
+  
   DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(KeyboardEvent, nsIDOMKeyEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMKeyEvent)
     DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(CompositionEvent, nsIDOMCompositionEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMCompositionEvent)
     DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
@@ -3169,17 +3164,17 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_BEGIN(OfflineResourceList, nsIDOMOfflineResourceList)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMOfflineResourceList)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(ClientRect, nsIDOMClientRect)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMClientRect)
    DOM_CLASSINFO_MAP_END
-
+ 
   DOM_CLASSINFO_MAP_BEGIN(ClientRectList, nsIDOMClientRectList)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMClientRectList)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(FileList, nsIDOMFileList)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMFileList)
   DOM_CLASSINFO_MAP_END
 
@@ -3324,17 +3319,17 @@ nsDOMClassInfo::Init()
 
   DOM_CLASSINFO_MAP_BEGIN(HTMLAudioElement, nsIDOMHTMLAudioElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLAudioElement)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(TimeRanges, nsIDOMTimeRanges)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMTimeRanges)
-  DOM_CLASSINFO_MAP_END
+  DOM_CLASSINFO_MAP_END  
 
   DOM_CLASSINFO_MAP_BEGIN(MediaStream, nsIDOMMediaStream)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMMediaStream)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(LocalMediaStream, nsIDOMLocalMediaStream)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMLocalMediaStream)
   DOM_CLASSINFO_MAP_END
@@ -3367,17 +3362,17 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_MAP_ENTRY(nsIInlineEventHandlers)
     DOM_CLASSINFO_MAP_CONDITIONAL_ENTRY(nsITouchEventReceiver,
                                         nsDOMTouchEvent::PrefEnabled())
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(PaintRequest, nsIDOMPaintRequest)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMPaintRequest)
    DOM_CLASSINFO_MAP_END
-
+ 
   DOM_CLASSINFO_MAP_BEGIN(PaintRequestList, nsIDOMPaintRequestList)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMPaintRequestList)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(ScrollAreaEvent, nsIDOMScrollAreaEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMScrollAreaEvent)
     DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
@@ -3485,17 +3480,17 @@ nsDOMClassInfo::Init()
                                         !nsDOMTouchEvent::PrefEnabled())
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMTouch)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN_MAYBE_DISABLE(TouchList, nsIDOMTouchList,
                                         !nsDOMTouchEvent::PrefEnabled())
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMTouchList)
   DOM_CLASSINFO_MAP_END
-
+  
   DOM_CLASSINFO_MAP_BEGIN_MAYBE_DISABLE(TouchEvent, nsIDOMTouchEvent,
                                         !nsDOMTouchEvent::PrefEnabled())
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMTouchEvent)
     DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(MozCSSKeyframeRule, nsIDOMMozCSSKeyframeRule)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozCSSKeyframeRule)
@@ -3556,17 +3551,17 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_MAP_ENTRY(nsIFMRadio)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
   DOM_CLASSINFO_MAP_END
 #endif
 
 #ifdef MOZ_B2G_BT
   DOM_CLASSINFO_MAP_BEGIN(BluetoothManager, nsIDOMBluetoothManager)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMBluetoothManager)
-  DOM_CLASSINFO_MAP_END
+  DOM_CLASSINFO_MAP_END  
 
   DOM_CLASSINFO_MAP_BEGIN(BluetoothAdapter, nsIDOMBluetoothAdapter)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMBluetoothAdapter)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(BluetoothDevice, nsIDOMBluetoothDevice)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMBluetoothDevice)
   DOM_CLASSINFO_MAP_END
@@ -3588,22 +3583,16 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMError)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(DOMRequest, nsIDOMDOMRequest)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMRequest)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(DOMCursor, nsIDOMDOMCursor)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMCursor)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMRequest)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(OpenWindowEventDetail, nsIOpenWindowEventDetail)
     DOM_CLASSINFO_MAP_ENTRY(nsIOpenWindowEventDetail)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(AsyncScrollEventDetail, nsIAsyncScrollEventDetail)
     DOM_CLASSINFO_MAP_ENTRY(nsIAsyncScrollEventDetail)
   DOM_CLASSINFO_MAP_END
 
@@ -4910,17 +4899,17 @@ DefineInterfaceConstants(JSContext *cx, 
 // This code is temporary until we remove support for the constants defined
 // on IDBCursor/IDBRequest/IDBTransaction
 
 struct IDBConstant
 {
   const char* interface;
   const char* name;
   const char* value;
-
+  
   static const char* IDBCursor;
   static const char* IDBRequest;
   static const char* IDBTransaction;
 };
 
 const char* IDBConstant::IDBCursor = "IDBCursor";
 const char* IDBConstant::IDBRequest = "IDBRequest";
 const char* IDBConstant::IDBTransaction = "IDBTransaction";
@@ -6073,17 +6062,17 @@ LocationSetterGuts(JSContext *cx, JSObje
 
   if (!location) {
     // Make this a no-op
     return NS_OK;
   }
 
   nsDependentJSString depStr;
   NS_ENSURE_TRUE(depStr.init(cx, val), NS_ERROR_UNEXPECTED);
-
+  
   return location->SetHref(depStr);
 }
 
 template<class Interface>
 static JSBool
 LocationSetter(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict,
                JSMutableHandleValue vp)
 {
@@ -6733,25 +6722,25 @@ static JSBool
 GetterShim(JSContext *cx, JSHandleObject obj, JSHandleId /* unused */, JSMutableHandleValue vp)
 {
   nsresult rv = (*func)(cx, obj, vp.address());
   if (NS_FAILED(rv)) {
     xpc::Throw(cx, rv);
     return JS_FALSE;
   }
 
-  return JS_TRUE;
+  return JS_TRUE;  
 }
 
 NS_IMETHODIMP
 nsNodeSH::PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj,
                     JSObject **parentObj)
 {
   nsINode *node = static_cast<nsINode*>(nativeObj);
-
+  
 #ifdef DEBUG
   {
     nsCOMPtr<nsINode> node_qi(do_QueryInterface(nativeObj));
 
     // If this assertion fires the QI implementation for the object in
     // question doesn't use the nsINode pointer as the nsISupports
     // pointer. That must be fixed, or we'll crash...
     NS_ABORT_IF_FALSE(node_qi == node, "Uh, fix QI!");
@@ -6787,17 +6776,17 @@ nsNodeSH::PreCreate(nsISupports *nativeO
 
     if (!native_parent) {
       native_parent = doc;
     }
   } else if (!node->IsNodeOfType(nsINode::eDOCUMENT)) {
     NS_ASSERTION(node->IsNodeOfType(nsINode::eCONTENT) ||
                  node->IsNodeOfType(nsINode::eATTRIBUTE),
                  "Unexpected node type");
-
+                 
     // For attributes and non-XUL content, use the document as scope parent.
     native_parent = doc;
 
     // But for HTML form controls, use the form as scope parent.
     if (nodeIsElement) {
       if (node->IsNodeOfType(nsINode::eHTML_FORM_CONTROL)) {
         nsCOMPtr<nsIFormControl> form_control(do_QueryInterface(node));
 
@@ -7154,17 +7143,17 @@ nsElementSH::PostCreate(nsIXPConnectWrap
   // We have a binding that must be installed.
   bool dummy;
 
   nsXBLService* xblService = nsXBLService::GetInstance();
   NS_ENSURE_TRUE(xblService, NS_ERROR_NOT_AVAILABLE);
 
   nsRefPtr<nsXBLBinding> binding;
   xblService->LoadBindings(element, uri, principal, getter_AddRefs(binding), &dummy);
-
+  
   if (binding) {
     if (nsContentUtils::IsSafeToRunScript()) {
       binding->ExecuteAttachedHandler();
     }
     else {
       nsContentUtils::AddScriptRunner(
         NS_NewRunnableMethod(binding, &nsXBLBinding::ExecuteAttachedHandler));
     }
@@ -7189,17 +7178,17 @@ NS_IMETHODIMP
 nsGenericArraySH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                              JSObject *obj, jsid id, uint32_t flags,
                              JSObject **objp, bool *_retval)
 {
   if (id == sLength_id) {
     // Bail early; this isn't something we're interested in
     return NS_OK;
   }
-
+  
   bool is_number = false;
   int32_t n = GetArrayIndexFromId(cx, id, &is_number);
 
   if (is_number && n >= 0) {
     // XXX The following is a cheap optimization to avoid hitting xpconnect to
     // get the length. We may want to consider asking our concrete
     // implementation for the length, and falling back onto the GetProperty if
     // it doesn't provide one.
@@ -8839,17 +8828,17 @@ nsHTMLPluginObjElementSH::NewResolve(nsI
 
   nsRefPtr<nsNPAPIPluginInstance> pi;
   nsresult rv = GetPluginInstanceIfSafe(wrapper, obj, cx, getter_AddRefs(pi));
   NS_ENSURE_SUCCESS(rv, rv);
 
   return nsElementSH::NewResolve(wrapper, cx, obj, id, flags, objp,
                                  _retval);
 }
-
+ 
 // Plugin helper
 
 nsISupports*
 nsPluginSH::GetItemAt(nsISupports *aNative, uint32_t aIndex,
                       nsWrapperCache **aCache, nsresult *aResult)
 {
   nsPluginElement* plugin = nsPluginElement::FromSupports(aNative);
 
@@ -9467,17 +9456,17 @@ nsSVGStringListSH::GetStringAt(nsISuppor
     return NS_OK;
   }
 
   DOMSVGStringList* list = static_cast<DOMSVGStringList*>(
                              static_cast<nsIDOMSVGStringList*>(aNative));
 #ifdef DEBUG
   {
     nsCOMPtr<nsIDOMSVGStringList> list_qi = do_QueryInterface(aNative);
-
+    
     // If this assertion fires the QI implementation for the object in
     // question doesn't use the nsIDOMDOMSVGStringList pointer as the
     // nsISupports pointer. That must be fixed, or we'll crash...
     NS_ABORT_IF_FALSE(list_qi == list, "Uh, fix QI!");
   }
 #endif
 
   nsresult rv = list->GetItem(aIndex, aResult);
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -146,32 +146,32 @@ DOMCI_CLASS(BoxObject)
 #ifdef MOZ_XUL
 DOMCI_CLASS(TreeSelection)
 DOMCI_CLASS(TreeContentView)
 #endif
 
 // Crypto classes
 DOMCI_CLASS(Crypto)
 DOMCI_CLASS(CRMFObject)
-
+  
 // DOM Traversal classes
 DOMCI_CLASS(TreeWalker)
 
 // Rect object used by getComputedStyle
 DOMCI_CLASS(CSSRect)
 
 // DOM Chrome Window class, almost identical to Window
 DOMCI_CLASS(ChromeWindow)
 
 // ContentList object used for various live NodeLists
 DOMCI_CLASS(ContentList)
-
+  
 // Processing-instruction with target "xml-stylesheet"
 DOMCI_CLASS(XMLStylesheetProcessingInstruction)
-
+  
 DOMCI_CLASS(ImageDocument)
 
 #ifdef MOZ_XUL
 DOMCI_CLASS(XULTemplateBuilder)
 DOMCI_CLASS(XULTreeBuilder)
 #endif
 
 // DOMStringList object
@@ -402,17 +402,16 @@ DOMCI_CLASS(BluetoothDevice)
 #endif
 
 DOMCI_CLASS(CameraManager)
 DOMCI_CLASS(CameraControl)
 DOMCI_CLASS(CameraCapabilities)
 
 DOMCI_CLASS(DOMError)
 DOMCI_CLASS(DOMRequest)
-DOMCI_CLASS(DOMCursor)
 DOMCI_CLASS(OpenWindowEventDetail)
 DOMCI_CLASS(AsyncScrollEventDetail)
 
 DOMCI_CLASS(DOMFileHandle)
 DOMCI_CLASS(FileRequest)
 DOMCI_CLASS(LockedFile)
 
 #ifdef MOZ_SYS_MSG
deleted file mode 100644
--- a/dom/base/nsIDOMDOMCursor.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-[scriptable, function, uuid(3a75d80a-9258-4ab8-95fd-ec0b5f634df1)]
-interface nsICursorContinueCallback : nsISupports
-{
-  void handleContinue();
-};
-
-[scriptable, builtinclass, uuid(062ea35a-5158-425a-b7bc-3ae9daa84398)]
-interface nsIDOMDOMCursor : nsISupports
-{
-  readonly attribute boolean done;
-  void continue();
-};
--- a/dom/base/nsIDOMDOMRequest.idl
+++ b/dom/base/nsIDOMDOMRequest.idl
@@ -3,41 +3,31 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEventTarget.idl"
 
 interface nsIDOMDOMError;
 interface nsIDOMWindow;
-interface nsIDOMDOMCursor;
-interface nsICursorContinueCallback;
 
 [scriptable, builtinclass, uuid(d88998b7-ee30-4ae5-bbed-58f5711929de)]
 interface nsIDOMDOMRequest : nsIDOMEventTarget
 {
   readonly attribute DOMString readyState; // "pending" or "done"
 
   readonly attribute jsval result;
   readonly attribute nsIDOMDOMError error;
 
   [implicit_jscontext] attribute jsval onsuccess;
   [implicit_jscontext] attribute jsval onerror;
 };
 
-[scriptable, builtinclass, uuid(060df968-fd71-47ca-91a8-6b64dadceb2c)]
+[scriptable, builtinclass, uuid(10996de9-e6f6-4058-97bd-45f1fe065eb5)]
 interface nsIDOMRequestService : nsISupports
 {
   nsIDOMDOMRequest createRequest(in nsIDOMWindow window);
-  /*
-   * @param aCallback
-   *        Called when `continue()' is called in the cursor, should be used to
-   *        notify the data provider that content wants the next result.
-   */
-  nsIDOMDOMCursor createCursor(in nsIDOMWindow window,
-                               in nsICursorContinueCallback aCallback);
 
   void fireSuccess(in nsIDOMDOMRequest request, in jsval result);
   void fireError(in nsIDOMDOMRequest request, in DOMString error);
   void fireSuccessAsync(in nsIDOMDOMRequest request, in jsval result);
   void fireErrorAsync(in nsIDOMDOMRequest request, in DOMString error);
-  void fireDone(in nsIDOMDOMCursor cursor);
 };
--- a/dom/base/test/Makefile.in
+++ b/dom/base/test/Makefile.in
@@ -20,17 +20,16 @@ MOCHITEST_FILES = \
   test_gsp-quirks.html \
   test_gsp-qualified.html \
   test_nondomexception.html \
   test_screen_orientation.html \
   test_window_constructor.html \
   test_window_enumeration.html \
   test_window_indexing.html \
   test_writable-replaceable.html \
-  test_domcursor.html \
   $(NULL)
 
 MOCHITEST_CHROME_FILES = \
    test_bug715041.xul \
    test_bug715041_removal.xul \
    $(NULL)
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/dom/base/test/test_domcursor.html
+++ /dev/null
@@ -1,145 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for DOMCursor</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" type="application/javascript;version=1.7">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-var reqserv = SpecialPowers.getDOMRequestService();
-ok("createRequest" in reqserv, "appears to be a service");
-
-var req;
-var lastContinue = false;
-
-var index = 0;
-
-function next() {
-  if (index < tests.length) {
-    ok(true, "Begin test");
-    tests[index++]();
-  } else {
-    ok(true, "All done");
-    SimpleTest.finish();
-  }
-}
-
-var tests = [
-  function() {
-    // create a cursor, test its interface and its initial state
-    req = reqserv.createCursor(window, function() {
-      if (lastContinue) {
-        reqserv.fireDone(req);
-      } else {
-        reqserv.fireSuccess(req, "next result")
-      }
-    });
-    ok("result" in req, "cursor has result");
-    ok("error" in req, "cursor has error");
-    ok("onsuccess" in req, "cursor has onsuccess");
-    ok("onerror" in req, "cursor has onerror");
-    ok("readyState" in req, "cursor has readyState");
-    ok("done" in req, "cursor has finished");
-    ok("continue" in req, "cursor has continue");
-
-    is(req.readyState, "pending", "readyState is pending");
-    is(req.result, undefined, "result is undefined");
-    is(req.onsuccess, null, "onsuccess is null");
-    is(req.onerror, null, "onerror is null");
-    next();
-  },
-  function() {
-    // fire success
-    req.onsuccess = function(e) {
-      ok(e, "got success event");
-      is(e.type, "success", "correct type during success");
-      is(e.target, req, "correct target during success");
-      is(req.readyState, "done", "correct readyState after success");
-      is(req.error, null, "correct error after success");
-      is(req.result, "my result", "correct result after success");
-      is(req.done, false, "cursor is not done after continue")
-      next();
-    }
-    reqserv.fireSuccess(req, "my result");
-  },
-  function() {
-    // continue
-    req.onsuccess = function(e) {
-      ok(e, "got success event after continue");
-      is(e.type, "success", "correct type during continue");
-      is(e.target, req, "correct target during continue");
-      is(req.readyState, "done", "correct readyState after continue");
-      is(req.error, null, "correct error after continue");
-      is(req.result, "next result", "correct result after continue");
-      is(req.done, false, "cursor is not done after continue")
-      next();
-    }
-    req.continue();
-    try {
-      req.continue();
-      ok(false, "calling continue twice should fail");
-    } catch (e) {
-      ok(true, "calling continue twice should fail");
-    }
-  },
-  function() {
-    // FireDone
-    req.onsuccess = function(e) {
-      ok(e, "got success event after continue");
-      is(e.type, "success", "correct type during continue");
-      is(e.target, req, "correct target during continue");
-      is(req.readyState, "done", "correct readyState after continue");
-      is(req.error, null, "correct error after continue");
-      is(req.result, undefined, "no result after last continue");
-      is(req.done, true, "cursor is done after last continue")
-      try {
-        req.continue();
-        ok(false, "continue when cursor is done should fail");
-      } catch (e) {
-        ok(true, "continue when cursor is done should fail");
-      }
-
-      next();
-    }
-    lastContinue = true;
-    req.continue();
-  },
-  function() {
-    // fire error
-    req = reqserv.createCursor(window, function(){});
-    req.onerror = function(e) {
-      ok(e, "got success event");
-      is(e.type, "error", "correct type during error");
-      is(e.target, req, "correct target during error");
-      is(req.readyState, "done", "correct readyState after error");
-      is(req.error.name, "error msg", "correct error after error");
-      is(req.result, undefined, "correct result after error");
-      try {
-        req.continue();
-        ok(false, "continue while in an error state should fail");
-      } catch (e) {
-        ok(true, "continue while in an error state should fail");
-      }
-
-      next();
-    }
-    reqserv.fireError(req, "error msg");
-  }
-];
-
-next();
-
-</script>
-</pre>
-</body>
-</html>
--- a/dom/base/test/test_domrequest.html
+++ b/dom/base/test/test_domrequest.html
@@ -1,12 +1,12 @@
 <!DOCTYPE HTML>
 <html>
 <head>
-  <title>Test for DOMRequest</title>
+  <title>Test for XMLHttpRequest</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -500,17 +500,17 @@ SpecialPowersAPI.prototype = {
     return bindDOMWindowUtils(aWindow);
   },
 
   removeExpectedCrashDumpFiles: function(aExpectingProcessCrash) {
     var success = true;
     if (aExpectingProcessCrash) {
       var message = {
         op: "delete-crash-dump-files",
-        filenames: this._encounteredCrashDumpFiles
+        filenames: this._encounteredCrashDumpFiles 
       };
       if (!this._sendSyncMessage("SPProcessCrashService", message)[0]) {
         success = false;
       }
     }
     this._encounteredCrashDumpFiles.length = 0;
     return success;
   },
@@ -591,17 +591,17 @@ SpecialPowersAPI.prototype = {
           if ((prefs.prefHasUserValue(prefName) && action == 'clear') ||
               (action == 'set'))
             originalValue = this._getPref(prefName, prefType);
         } else if (action == 'set') {
           /* prefName doesn't exist, so 'clear' is pointless */
           if (aPref.length == 3) {
             prefType = "COMPLEX";
           } else if (aPref.length == 2) {
-            if (typeof(prefValue) == "boolean")
+            if (typeof(prefValue) == "boolean") 
               prefType = "BOOL";
             else if (typeof(prefValue) == "number")
               prefType = "INT";
             else if (typeof(prefValue) == "string")
               prefType = "CHAR";
           }
         }
 
@@ -652,34 +652,34 @@ SpecialPowersAPI.prototype = {
     if (this._prefEnvUndoStack.length > 0) {
       // See pushPrefEnv comment regarding delay.
       function delayedCallback() {
         function delayAgain() {
           content.window.setTimeout(callback, 0);
         }
         content.window.setTimeout(delayAgain, 0);
       }
-      let cb = callback ? delayedCallback : null;
+      let cb = callback ? delayedCallback : null; 
       /* Each pop will have a valid block of preferences */
       this._pendingPrefs.push([this._prefEnvUndoStack.pop(), cb]);
       this._applyPrefs();
     } else {
       content.window.setTimeout(callback, 0);
     }
   },
 
   flushPrefEnv: function(callback) {
     while (this._prefEnvUndoStack.length > 1)
       this.popPrefEnv(null);
 
     this.popPrefEnv(callback);
   },
 
   /*
-    Iterate through one atomic set of pref actions and perform sets/clears as appropriate.
+    Iterate through one atomic set of pref actions and perform sets/clears as appropriate. 
     All actions performed must modify the relevant pref.
   */
   _applyPrefs: function() {
     if (this._applyingPrefs || this._pendingPrefs.length <= 0) {
       return;
     }
 
     /* Set lock and get prefs from the _pendingPrefs queue */
@@ -726,22 +726,22 @@ SpecialPowersAPI.prototype = {
                    .getService(Ci.nsIObserverService);
     obsvc.addObserver(obs, notification, weak);
   },
   removeObserver: function(obs, notification) {
     var obsvc = Cc['@mozilla.org/observer-service;1']
                    .getService(Ci.nsIObserverService);
     obsvc.removeObserver(obs, notification);
   },
-
+   
   can_QI: function(obj) {
     return obj.QueryInterface !== undefined;
   },
   do_QueryInterface: function(obj, iface) {
-    return obj.QueryInterface(Ci[iface]);
+    return obj.QueryInterface(Ci[iface]); 
   },
 
   call_Instanceof: function (obj1, obj2) {
      obj1=unwrapIfWrapped(obj1);
      obj2=unwrapIfWrapped(obj2);
      return obj1 instanceof obj2;
   },
 
@@ -1031,17 +1031,17 @@ SpecialPowersAPI.prototype = {
       getService(Ci.nsIEventListenerService).
       removeSystemEventListener(target, type, listener, useCapture);
   },
 
   getDOMRequestService: function() {
     var serv = Cc["@mozilla.org/dom/dom-request-service;1"].
       getService(Ci.nsIDOMRequestService);
     var res = { __exposedProps__: {} };
-    var props = ["createRequest", "createCursor", "fireError", "fireSuccess", "fireDone"];
+    var props = ["createRequest", "fireError", "fireSuccess"];
     for (i in props) {
       let prop = props[i];
       res[prop] = function() { return serv[prop].apply(serv, arguments) };
       res.__exposedProps__[prop] = "r";
     }
     return res;
   },
 
@@ -1120,18 +1120,18 @@ SpecialPowersAPI.prototype = {
 
   focusedWindow: function() {
     return this.focusManager.focusedWindow;
   },
 
   focus: function(window) {
     window.focus();
   },
-
-  getClipboardData: function(flavor) {
+  
+  getClipboardData: function(flavor) {  
     if (this._cb == null)
       this._cb = Components.classes["@mozilla.org/widget/clipboard;1"].
                             getService(Components.interfaces.nsIClipboard);
 
     var xferable = Components.classes["@mozilla.org/widget/transferable;1"].
                    createInstance(Components.interfaces.nsITransferable);
     xferable.init(this._getDocShell(content.window)
                       .QueryInterface(Components.interfaces.nsILoadContext));
@@ -1139,17 +1139,17 @@ SpecialPowersAPI.prototype = {
     this._cb.getData(xferable, this._cb.kGlobalClipboard);
     var data = {};
     try {
       xferable.getTransferData(flavor, data, {});
     } catch (e) {}
     data = data.value || null;
     if (data == null)
       return "";
-
+      
     return data.QueryInterface(Components.interfaces.nsISupportsString).data;
   },
 
   clipboardCopyString: function(preExpectedVal, doc) {
     var cbHelperSvc = Components.classes["@mozilla.org/widget/clipboardhelper;1"].
                       getService(Components.interfaces.nsIClipboardHelper);
     cbHelperSvc.copyString(preExpectedVal, doc);
   },
@@ -1157,22 +1157,22 @@ SpecialPowersAPI.prototype = {
   supportsSelectionClipboard: function() {
     if (this._cb == null) {
       this._cb = Components.classes["@mozilla.org/widget/clipboard;1"].
                             getService(Components.interfaces.nsIClipboard);
     }
     return this._cb.supportsSelectionClipboard();
   },
 
-  swapFactoryRegistration: function(cid, contractID, newFactory, oldFactory) {
+  swapFactoryRegistration: function(cid, contractID, newFactory, oldFactory) {  
     var componentRegistrar = Components.manager.QueryInterface(Components.interfaces.nsIComponentRegistrar);
 
     var unregisterFactory = newFactory;
     var registerFactory = oldFactory;
-
+    
     if (cid == null) {
       if (contractID != null) {
         cid = componentRegistrar.contractIDToCID(contractID);
         oldFactory = Components.manager.getClassObject(Components.classes[contractID],
                                                             Components.interfaces.nsIFactory);
       } else {
         return {'error': "trying to register a new contract ID: Missing contractID"};
       }
@@ -1185,22 +1185,22 @@ SpecialPowersAPI.prototype = {
 
     // Restore the original factory.
     componentRegistrar.registerFactory(cid,
                                        "",
                                        contractID,
                                        registerFactory);
     return {'cid':cid, 'originalFactory':oldFactory};
   },
-
+  
   _getElement: function(aWindow, id) {
     return ((typeof(id) == "string") ?
-        aWindow.document.getElementById(id) : id);
+        aWindow.document.getElementById(id) : id); 
   },
-
+  
   dispatchEvent: function(aWindow, target, event) {
     var el = this._getElement(aWindow, target);
     return el.dispatchEvent(event);
   },
 
   get isDebugBuild() {
     delete this.isDebugBuild;
     var debug = Cc["@mozilla.org/xpcom/debug;1"].getService(Ci.nsIDebug2);
@@ -1210,25 +1210,25 @@ SpecialPowersAPI.prototype = {
   /**
    * Get the message manager associated with an <iframe mozbrowser>.
    */
   getBrowserFrameMessageManager: function(aFrameElement) {
     return this.wrap(aFrameElement.QueryInterface(Ci.nsIFrameLoaderOwner)
                                   .frameLoader
                                   .messageManager);
   },
-
+  
   setFullscreenAllowed: function(document) {
     var pm = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager);
     pm.addFromPrincipal(document.nodePrincipal, "fullscreen", Ci.nsIPermissionManager.ALLOW_ACTION);
     var obsvc = Cc['@mozilla.org/observer-service;1']
                    .getService(Ci.nsIObserverService);
     obsvc.notifyObservers(document, "fullscreen-approved", null);
   },
-
+  
   removeFullscreenAllowed: function(document) {
     var pm = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager);
     pm.removeFromPrincipal(document.nodePrincipal, "fullscreen");
   },
 
   _getInfoFromPermissionArg: function(arg) {
     let url = "";
     let appId = Ci.nsIScriptSecurityManager.NO_APP_ID;
@@ -1239,17 +1239,17 @@ SpecialPowersAPI.prototype = {
       url = Cc["@mozilla.org/network/io-service;1"]
               .getService(Ci.nsIIOService)
               .newURI(arg, null, null)
               .spec;
     } else if (arg.manifestURL) {
       // It's a thing representing an app.
       let appsSvc = Cc["@mozilla.org/AppsService;1"]
                       .getService(Ci.nsIAppsService)
-      let app = appsSvc.getAppByManifestURL(arg.manifestURL);
+      let app = appsSvc.getAppByManifestURL(arg.manifestURL); 
 
       if (!app) {
         throw "No app for this manifest!";
       }
 
       appId = appsSvc.getAppLocalIdByManifestURL(arg.manifestURL);
       url = app.origin;
       isInBrowserElement = arg.isInBrowserElement || false;