Bug 1416139. Make nsIDOMNodeList non-scriptable. r=mystor
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 13 Nov 2017 10:41:47 -0500
changeset 436042 01a5361e9460683fb43c05a3c267eec4bbef081d
parent 436041 be7765b6b04948083e15375f84faccd23b9dc004
child 436043 0afee55b7f4f7033287eae2109f82545dbc32168
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersmystor
bugs1416139, 120684
milestone59.0a1
Bug 1416139. Make nsIDOMNodeList non-scriptable. r=mystor The old reasons for having it be scriptable are no longer relevant since bug 120684 was fixed. MozReview-Commit-ID: DOGuhKJRWOn
dom/interfaces/core/nsIDOMNodeList.idl
xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
--- a/dom/interfaces/core/nsIDOMNodeList.idl
+++ b/dom/interfaces/core/nsIDOMNodeList.idl
@@ -10,16 +10,14 @@
  * collection of nodes, without defining or constraining how this collection 
  * is implemented.
  * The items in the list are accessible via an integral index, starting from 0.
  *
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
-// NOTE: Please do not attempt to make this not scriptable,
-// see https://bugzilla.mozilla.org/show_bug.cgi?id=994964#c73.
-[scriptable, uuid(450cf0ba-de90-4f86-85bf-e10cc8b8713f)]
+[uuid(450cf0ba-de90-4f86-85bf-e10cc8b8713f)]
 interface nsIDOMNodeList : nsISupports
 {
   nsIDOMNode    item(in unsigned long index);
   readonly attribute unsigned long          length;
 };
--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
@@ -53,16 +53,17 @@
 #include "nsIDOMKeyEvent.h"
 #include "nsIDOMMediaList.h"
 #include "nsIDOMMouseEvent.h"
 #include "nsIDOMMouseScrollEvent.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsIDOMMozNamedAttrMap.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMNodeIterator.h"
+#include "nsIDOMNodeList.h"
 #include "nsIDOMNotifyPaintEvent.h"
 #include "nsIDOMNSEvent.h"
 #include "nsIDOMOfflineResourceList.h"
 #include "nsIDOMPaintRequest.h"
 #include "nsIDOMParser.h"
 #include "nsIDOMProcessingInstruction.h"
 #include "nsIDOMRange.h"
 #include "nsIDOMRect.h"
@@ -151,16 +152,17 @@
 #include "mozilla/dom/MediaListBinding.h"
 #include "mozilla/dom/MessageEventBinding.h"
 #include "mozilla/dom/MenuBoxObjectBinding.h"
 #include "mozilla/dom/MouseEventBinding.h"
 #include "mozilla/dom/MouseScrollEventBinding.h"
 #include "mozilla/dom/MutationEventBinding.h"
 #include "mozilla/dom/NamedNodeMapBinding.h"
 #include "mozilla/dom/NodeIteratorBinding.h"
+#include "mozilla/dom/NodeListBinding.h"
 #include "mozilla/dom/NodeBinding.h"
 #include "mozilla/dom/NotifyPaintEventBinding.h"
 #include "mozilla/dom/EventBinding.h"
 #include "mozilla/dom/OfflineResourceListBinding.h"
 #include "mozilla/dom/PaintRequestBinding.h"
 #include "mozilla/dom/PositionErrorBinding.h"
 #include "mozilla/dom/ProcessingInstructionBinding.h"
 #include "mozilla/dom/RangeBinding.h"
@@ -297,16 +299,17 @@ const ComponentsInterfaceShimEntry kComp
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIListBoxObject, ListBoxObject),
   DEFINE_SHIM(MediaList),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIMenuBoxObject, MenuBoxObject),
   DEFINE_SHIM(MouseEvent),
   DEFINE_SHIM(MouseScrollEvent),
   DEFINE_SHIM(MutationEvent),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMMozNamedAttrMap, NamedNodeMap),
   DEFINE_SHIM(NodeIterator),
+  DEFINE_SHIM(NodeList),
   DEFINE_SHIM(Node),
   DEFINE_SHIM(NotifyPaintEvent),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMNSEvent, Event),
   DEFINE_SHIM(OfflineResourceList),
   DEFINE_SHIM(PaintRequest),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMParser, DOMParser),
   DEFINE_SHIM(ProcessingInstruction),
   DEFINE_SHIM(Range),