Bug 792790 - Introduce NoBoundsCheck variants of accessors on nsHtml5HtmlAttributes; Make operator= in jArray nullptr-aware. r=smaug.
authorHenri Sivonen <hsivonen@iki.fi>
Mon, 01 Oct 2012 11:49:01 +0300
changeset 108846 b7cc4a94a64942e79f5ef90478f7ab191bdfb9a6
parent 108845 82ee9a90351f1942930bfb144a74621ee722639f
child 108847 1caa3c482541911876778e6f1c26e95975a5419c
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewerssmaug
bugs792790
milestone18.0a1
Bug 792790 - Introduce NoBoundsCheck variants of accessors on nsHtml5HtmlAttributes; Make operator= in jArray nullptr-aware. r=smaug.
parser/html/jArray.h
parser/html/javasrc/HtmlAttributes.java
parser/html/javasrc/TreeBuilder.java
parser/html/nsHtml5HtmlAttributes.cpp
parser/html/nsHtml5HtmlAttributes.h
parser/html/nsHtml5Tokenizer.cpp
parser/html/nsHtml5TreeBuilder.cpp
parser/html/nsHtml5TreeOperation.cpp
--- a/parser/html/jArray.h
+++ b/parser/html/jArray.h
@@ -18,16 +18,17 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef jArray_h_
 #define jArray_h_
 
+#include "mozilla/NullPtr.h"
 #include "nsDebug.h"
 
 template<class T, class L>
 struct staticJArray {
   const T* arr;
   const L length;
   operator T*() { return arr; }
   T& operator[] (L const index) { return ((T*)arr)[index]; }
@@ -94,18 +95,31 @@ class autoJArray {
       jArray<T,L> newArray = { arr, length };
       return newArray;
     }
     void operator=(const jArray<T,L>& other) {
       delete[] arr;
       arr = other.arr;
       length = other.length;
     }
-    void operator=(L zero) {
+#if defined(__clang__)
+    // clang on OS X 10.7 does not have std::nullptr_t
+    typedef decltype(nullptr) jArray_nullptr_t;
+#elif defined(MOZ_HAVE_CXX11_NULLPTR)
+    // decltype(nullptr) does not evaluate to std::nullptr_t on GCC 4.6.3
+    typedef std::nullptr_t jArray_nullptr_t;
+#elif defined(__GNUC__)
+    typedef void* jArray_nullptr_t;
+#elif defined(_WIN64)
+    typedef uint64_t jArray_nullptr_t;
+#else
+    typedef uint32_t jArray_nullptr_t;
+#endif
+    void operator=(jArray_nullptr_t zero) {
       // Make assigning null to an array in Java delete the buffer in C++
-      NS_ASSERTION(!zero, "Non-zero integer assigned to jArray.");
+      // MSVC10 does not allow asserting that zero is null.
       delete[] arr;
-      arr = 0;
+      arr = nullptr;
       length = 0;
     }
 };
 
 #endif // jArray_h_
--- a/parser/html/javasrc/HtmlAttributes.java
+++ b/parser/html/javasrc/HtmlAttributes.java
@@ -126,18 +126,104 @@ public final class HtmlAttributes implem
         for (int i = 0; i < length; i++) {
             if (names[i] == name) {
                 return i;
             }
         }
         return -1;
     }
 
+    /**
+     * Only use with static argument.
+     * 
+     * @see org.xml.sax.Attributes#getValue(java.lang.String)
+     */
+    public String getValue(AttributeName name) {
+        int index = getIndex(name);
+        if (index == -1) {
+            return null;
+        } else {
+            return getValueNoBoundsCheck(index);
+        }
+    }
+
+    public int getLength() {
+        return length;
+    }
+
+    /**
+     * Variant of <code>getLocalName(int index)</code> without bounds check.
+     * @param index a valid attribute index
+     * @return the local name at index
+     */
+    public @Local String getLocalNameNoBoundsCheck(int index) {
+        // CPPONLY: assert index < length && index >= 0: "Index out of bounds";
+        return names[index].getLocal(mode);
+    }
+
+    /**
+     * Variant of <code>getURI(int index)</code> without bounds check.
+     * @param index a valid attribute index
+     * @return the namespace URI at index
+     */
+    public @NsUri String getURINoBoundsCheck(int index) {
+        // CPPONLY: assert index < length && index >= 0: "Index out of bounds";
+        return names[index].getUri(mode);
+    }
+
+    /**
+     * Variant of <code>getPrefix(int index)</code> without bounds check.
+     * @param index a valid attribute index
+     * @return the namespace prefix at index
+     */
+    public @Prefix String getPrefixNoBoundsCheck(int index) {
+        // CPPONLY: assert index < length && index >= 0: "Index out of bounds";
+        return names[index].getPrefix(mode);
+    }
+
+    /**
+     * Variant of <code>getValue(int index)</code> without bounds check.
+     * @param index a valid attribute index
+     * @return the attribute value at index
+     */
+    public String getValueNoBoundsCheck(int index) {
+        // CPPONLY: assert index < length && index >= 0: "Index out of bounds";
+        return values[index];
+    }
+
+    /**
+     * Variant of <code>getAttributeName(int index)</code> without bounds check.
+     * @param index a valid attribute index
+     * @return the attribute name at index
+     */
+    public AttributeName getAttributeNameNoBoundsCheck(int index) {
+        // CPPONLY: assert index < length && index >= 0: "Index out of bounds";
+        return names[index];
+    }
+
     // [NOCPP[
     
+    /**
+     * Variant of <code>getQName(int index)</code> without bounds check.
+     * @param index a valid attribute index
+     * @return the QName at index
+     */
+    public @QName String getQNameNoBoundsCheck(int index) {
+        return names[index].getQName(mode);
+    }
+
+    /**
+     * Variant of <code>getType(int index)</code> without bounds check.
+     * @param index a valid attribute index
+     * @return the attribute type at index
+     */
+    public @IdType String getTypeNoBoundsCheck(int index) {
+        return (names[index] == AttributeName.ID) ? "ID" : "CDATA";
+    }
+
     public int getIndex(String qName) {
         for (int i = 0; i < length; i++) {
             if (names[i].getQName(mode).equals(qName)) {
                 return i;
             }
         }
         return -1;
     }
@@ -183,31 +269,23 @@ public final class HtmlAttributes implem
         int index = getIndex(uri, localName);
         if (index == -1) {
             return null;
         } else {
             return getValue(index);
         }
     }
     
-    // ]NOCPP]
-    
-    public int getLength() {
-        return length;
-    }
-
     public @Local String getLocalName(int index) {
         if (index < length && index >= 0) {
             return names[index].getLocal(mode);
         } else {
             return null;
         }
     }
-
-    // [NOCPP[
     
     public @QName String getQName(int index) {
         if (index < length && index >= 0) {
             return names[index].getQName(mode);
         } else {
             return null;
         }
     }
@@ -215,18 +293,16 @@ public final class HtmlAttributes implem
     public @IdType String getType(int index) {
         if (index < length && index >= 0) {
             return (names[index] == AttributeName.ID) ? "ID" : "CDATA";
         } else {
             return null;
         }
     }
 
-    // ]NOCPP]
-    
     public AttributeName getAttributeName(int index) {
         if (index < length && index >= 0) {
             return names[index];
         } else {
             return null;
         }
     }
 
@@ -249,32 +325,16 @@ public final class HtmlAttributes implem
     public String getValue(int index) {
         if (index < length && index >= 0) {
             return values[index];
         } else {
             return null;
         }
     }
 
-    /**
-     * Only use with static argument.
-     * 
-     * @see org.xml.sax.Attributes#getValue(java.lang.String)
-     */
-    public String getValue(AttributeName name) {
-        int index = getIndex(name);
-        if (index == -1) {
-            return null;
-        } else {
-            return getValue(index);
-        }
-    }
-    
-    // [NOCPP[
-
     public String getId() {
         return idValue;
     }
 
     public int getXmlnsLength() {
         return xmlnsLength;
     }
 
@@ -513,19 +573,19 @@ public final class HtmlAttributes implem
                 }
             }
         }
     }
     
     public void merge(HtmlAttributes attributes) throws SAXException {
         int len = attributes.getLength();
         for (int i = 0; i < len; i++) {
-            AttributeName name = attributes.getAttributeName(i);
+            AttributeName name = attributes.getAttributeNameNoBoundsCheck(i);
             if (!contains(name)) {
-                addAttribute(name, attributes.getValue(i), XmlViolationPolicy.ALLOW);
+                addAttribute(name, attributes.getValueNoBoundsCheck(i), XmlViolationPolicy.ALLOW);
             }
         }
     }
 
 
     // ]NOCPP]
     
 }
--- a/parser/html/javasrc/TreeBuilder.java
+++ b/parser/html/javasrc/TreeBuilder.java
@@ -2138,55 +2138,55 @@ public abstract class TreeBuilder<T> imp
                                     break starttagloop;
                                 }
                                 implicitlyCloseP();
                                 HtmlAttributes formAttrs = new HtmlAttributes(0);
                                 int actionIndex = attributes.getIndex(AttributeName.ACTION);
                                 if (actionIndex > -1) {
                                     formAttrs.addAttribute(
                                             AttributeName.ACTION,
-                                            attributes.getValue(actionIndex)
+                                            attributes.getValueNoBoundsCheck(actionIndex)
                                             // [NOCPP[
                                             , XmlViolationPolicy.ALLOW
                                     // ]NOCPP]
                                     );
                                 }
                                 appendToCurrentNodeAndPushFormElementMayFoster(formAttrs);
                                 appendVoidElementToCurrentMayFoster(
                                         ElementName.HR,
                                         HtmlAttributes.EMPTY_ATTRIBUTES);
                                 appendToCurrentNodeAndPushElementMayFoster(
                                         ElementName.LABEL,
                                         HtmlAttributes.EMPTY_ATTRIBUTES);
                                 int promptIndex = attributes.getIndex(AttributeName.PROMPT);
                                 if (promptIndex > -1) {
-                                    @Auto char[] prompt = Portability.newCharArrayFromString(attributes.getValue(promptIndex));
+                                    @Auto char[] prompt = Portability.newCharArrayFromString(attributes.getValueNoBoundsCheck(promptIndex));
                                     appendCharacters(stack[currentPtr].node,
                                             prompt, 0, prompt.length);
                                 } else {
                                     appendIsindexPrompt(stack[currentPtr].node);
                                 }
                                 HtmlAttributes inputAttributes = new HtmlAttributes(
                                         0);
                                 inputAttributes.addAttribute(
                                         AttributeName.NAME,
                                         Portability.newStringFromLiteral("isindex")
                                         // [NOCPP[
                                         , XmlViolationPolicy.ALLOW
                                 // ]NOCPP]
                                 );
                                 for (int i = 0; i < attributes.getLength(); i++) {
-                                    AttributeName attributeQName = attributes.getAttributeName(i);
+                                    AttributeName attributeQName = attributes.getAttributeNameNoBoundsCheck(i);
                                     if (AttributeName.NAME == attributeQName
                                             || AttributeName.PROMPT == attributeQName) {
                                         attributes.releaseValue(i);
                                     } else if (AttributeName.ACTION != attributeQName) {
                                         inputAttributes.addAttribute(
                                                 attributeQName,
-                                                attributes.getValue(i)
+                                                attributes.getValueNoBoundsCheck(i)
                                                 // [NOCPP[
                                                 , XmlViolationPolicy.ALLOW
                                         // ]NOCPP]
 
                                         );
                                     }
                                 }
                                 attributes.clearWithoutReleasingContents();
--- a/parser/html/nsHtml5HtmlAttributes.cpp
+++ b/parser/html/nsHtml5HtmlAttributes.cpp
@@ -79,81 +79,66 @@ nsHtml5HtmlAttributes::getIndex(nsHtml5A
   for (int32_t i = 0; i < length; i++) {
     if (names[i] == name) {
       return i;
     }
   }
   return -1;
 }
 
+nsString* 
+nsHtml5HtmlAttributes::getValue(nsHtml5AttributeName* name)
+{
+  int32_t index = getIndex(name);
+  if (index == -1) {
+    return nullptr;
+  } else {
+    return getValueNoBoundsCheck(index);
+  }
+}
+
 int32_t 
 nsHtml5HtmlAttributes::getLength()
 {
   return length;
 }
 
 nsIAtom* 
-nsHtml5HtmlAttributes::getLocalName(int32_t index)
+nsHtml5HtmlAttributes::getLocalNameNoBoundsCheck(int32_t index)
 {
-  if (index < length && index >= 0) {
-    return names[index]->getLocal(mode);
-  } else {
-    return nullptr;
-  }
-}
 
-nsHtml5AttributeName* 
-nsHtml5HtmlAttributes::getAttributeName(int32_t index)
-{
-  if (index < length && index >= 0) {
-    return names[index];
-  } else {
-    return nullptr;
-  }
+  return names[index]->getLocal(mode);
 }
 
 int32_t 
-nsHtml5HtmlAttributes::getURI(int32_t index)
+nsHtml5HtmlAttributes::getURINoBoundsCheck(int32_t index)
 {
-  if (index < length && index >= 0) {
-    return names[index]->getUri(mode);
-  } else {
-    return 0;
-  }
+
+  return names[index]->getUri(mode);
 }
 
 nsIAtom* 
-nsHtml5HtmlAttributes::getPrefix(int32_t index)
+nsHtml5HtmlAttributes::getPrefixNoBoundsCheck(int32_t index)
 {
-  if (index < length && index >= 0) {
-    return names[index]->getPrefix(mode);
-  } else {
-    return nullptr;
-  }
+
+  return names[index]->getPrefix(mode);
 }
 
 nsString* 
-nsHtml5HtmlAttributes::getValue(int32_t index)
+nsHtml5HtmlAttributes::getValueNoBoundsCheck(int32_t index)
 {
-  if (index < length && index >= 0) {
-    return values[index];
-  } else {
-    return nullptr;
-  }
+
+  return values[index];
 }
 
-nsString* 
-nsHtml5HtmlAttributes::getValue(nsHtml5AttributeName* name)
+nsHtml5AttributeName* 
+nsHtml5HtmlAttributes::getAttributeNameNoBoundsCheck(int32_t index)
 {
-  int32_t index = getIndex(name);
-  if (index == -1) {
-    return nullptr;
-  } else {
-    return getValue(index);
-  }
+
+  return names[index];
 }
 
 void 
 nsHtml5HtmlAttributes::addAttribute(nsHtml5AttributeName* name, nsString* value)
 {
   if (names.length == length) {
     int32_t newLen = length << 1;
     jArray<nsHtml5AttributeName*,int32_t> newNames = jArray<nsHtml5AttributeName*,int32_t>::newJArray(newLen);
--- a/parser/html/nsHtml5HtmlAttributes.h
+++ b/parser/html/nsHtml5HtmlAttributes.h
@@ -64,23 +64,23 @@ class nsHtml5HtmlAttributes
     int32_t mode;
     int32_t length;
     autoJArray<nsHtml5AttributeName*,int32_t> names;
     autoJArray<nsString*,int32_t> values;
   public:
     nsHtml5HtmlAttributes(int32_t mode);
     ~nsHtml5HtmlAttributes();
     int32_t getIndex(nsHtml5AttributeName* name);
+    nsString* getValue(nsHtml5AttributeName* name);
     int32_t getLength();
-    nsIAtom* getLocalName(int32_t index);
-    nsHtml5AttributeName* getAttributeName(int32_t index);
-    int32_t getURI(int32_t index);
-    nsIAtom* getPrefix(int32_t index);
-    nsString* getValue(int32_t index);
-    nsString* getValue(nsHtml5AttributeName* name);
+    nsIAtom* getLocalNameNoBoundsCheck(int32_t index);
+    int32_t getURINoBoundsCheck(int32_t index);
+    nsIAtom* getPrefixNoBoundsCheck(int32_t index);
+    nsString* getValueNoBoundsCheck(int32_t index);
+    nsHtml5AttributeName* getAttributeNameNoBoundsCheck(int32_t index);
     void addAttribute(nsHtml5AttributeName* name, nsString* value);
     void clear(int32_t m);
     void releaseValue(int32_t i);
     void clearWithoutReleasingContents();
     bool contains(nsHtml5AttributeName* name);
     void adjustForMath();
     void adjustForSvg();
     nsHtml5HtmlAttributes* cloneAttributes(nsHtml5AtomTable* interner);
--- a/parser/html/nsHtml5Tokenizer.cpp
+++ b/parser/html/nsHtml5Tokenizer.cpp
@@ -3901,18 +3901,18 @@ nsHtml5Tokenizer::emitOrAppendOne(const 
   } else {
     tokenHandler->characters(val, 0, 1);
   }
 }
 
 void 
 nsHtml5Tokenizer::end()
 {
-  strBuf = 0;
-  longStrBuf = 0;
+  strBuf = nullptr;
+  longStrBuf = nullptr;
   doctypeName = nullptr;
   if (systemIdentifier) {
     nsHtml5Portability::releaseString(systemIdentifier);
     systemIdentifier = nullptr;
   }
   if (publicIdentifier) {
     nsHtml5Portability::releaseString(publicIdentifier);
     publicIdentifier = nullptr;
--- a/parser/html/nsHtml5TreeBuilder.cpp
+++ b/parser/html/nsHtml5TreeBuilder.cpp
@@ -543,28 +543,28 @@ nsHtml5TreeBuilder::endTokenization()
   formPointer = nullptr;
   headPointer = nullptr;
   deepTreeSurrogateParent = nullptr;
   if (stack) {
     while (currentPtr > -1) {
       stack[currentPtr]->release();
       currentPtr--;
     }
-    stack = 0;
+    stack = nullptr;
   }
   if (listOfActiveFormattingElements) {
     while (listPtr > -1) {
       if (listOfActiveFormattingElements[listPtr]) {
         listOfActiveFormattingElements[listPtr]->release();
       }
       listPtr--;
     }
-    listOfActiveFormattingElements = 0;
+    listOfActiveFormattingElements = nullptr;
   }
-  charBuffer = 0;
+  charBuffer = nullptr;
   end();
 }
 
 void 
 nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, bool selfClosing)
 {
   flushCharacters();
   int32_t eltPos;
@@ -1127,36 +1127,36 @@ nsHtml5TreeBuilder::startTag(nsHtml5Elem
               errIsindex();
               if (formPointer) {
                 NS_HTML5_BREAK(starttagloop);
               }
               implicitlyCloseP();
               nsHtml5HtmlAttributes* formAttrs = new nsHtml5HtmlAttributes(0);
               int32_t actionIndex = attributes->getIndex(nsHtml5AttributeName::ATTR_ACTION);
               if (actionIndex > -1) {
-                formAttrs->addAttribute(nsHtml5AttributeName::ATTR_ACTION, attributes->getValue(actionIndex));
+                formAttrs->addAttribute(nsHtml5AttributeName::ATTR_ACTION, attributes->getValueNoBoundsCheck(actionIndex));
               }
               appendToCurrentNodeAndPushFormElementMayFoster(formAttrs);
               appendVoidElementToCurrentMayFoster(nsHtml5ElementName::ELT_HR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
               appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName::ELT_LABEL, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
               int32_t promptIndex = attributes->getIndex(nsHtml5AttributeName::ATTR_PROMPT);
               if (promptIndex > -1) {
-                autoJArray<PRUnichar,int32_t> prompt = nsHtml5Portability::newCharArrayFromString(attributes->getValue(promptIndex));
+                autoJArray<PRUnichar,int32_t> prompt = nsHtml5Portability::newCharArrayFromString(attributes->getValueNoBoundsCheck(promptIndex));
                 appendCharacters(stack[currentPtr]->node, prompt, 0, prompt.length);
               } else {
                 appendIsindexPrompt(stack[currentPtr]->node);
               }
               nsHtml5HtmlAttributes* inputAttributes = new nsHtml5HtmlAttributes(0);
               inputAttributes->addAttribute(nsHtml5AttributeName::ATTR_NAME, nsHtml5Portability::newStringFromLiteral("isindex"));
               for (int32_t i = 0; i < attributes->getLength(); i++) {
-                nsHtml5AttributeName* attributeQName = attributes->getAttributeName(i);
+                nsHtml5AttributeName* attributeQName = attributes->getAttributeNameNoBoundsCheck(i);
                 if (nsHtml5AttributeName::ATTR_NAME == attributeQName || nsHtml5AttributeName::ATTR_PROMPT == attributeQName) {
                   attributes->releaseValue(i);
                 } else if (nsHtml5AttributeName::ATTR_ACTION != attributeQName) {
-                  inputAttributes->addAttribute(attributeQName, attributes->getValue(i));
+                  inputAttributes->addAttribute(attributeQName, attributes->getValueNoBoundsCheck(i));
                 }
               }
               attributes->clearWithoutReleasingContents();
               appendVoidElementToCurrentMayFoster(nsHtml5Atoms::input, inputAttributes, formPointer);
               pop();
               appendVoidElementToCurrentMayFoster(nsHtml5ElementName::ELT_HR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
               pop();
               selfClosing = false;
--- a/parser/html/nsHtml5TreeOperation.cpp
+++ b/parser/html/nsHtml5TreeOperation.cpp
@@ -300,22 +300,27 @@ nsHtml5TreeOperation::Perform(nsHtml5Tre
       nsHtml5OtherDocUpdate update(node->OwnerDoc(),
                                    aBuilder->GetDocument());
 
       int32_t len = attributes->getLength();
       for (int32_t i = len; i > 0;) {
         --i;
         // prefix doesn't need regetting. it is always null or a static atom
         // local name is never null
-        nsCOMPtr<nsIAtom> localName = Reget(attributes->getLocalName(i));
-        int32_t nsuri = attributes->getURI(i);
+        nsCOMPtr<nsIAtom> localName =
+          Reget(attributes->getLocalNameNoBoundsCheck(i));
+        int32_t nsuri = attributes->getURINoBoundsCheck(i);
         if (!node->HasAttr(nsuri, localName)) {
           // prefix doesn't need regetting. it is always null or a static atom
           // local name is never null
-          node->SetAttr(nsuri, localName, attributes->getPrefix(i), *(attributes->getValue(i)), true);
+          node->SetAttr(nsuri,
+                        localName,
+                        attributes->getPrefixNoBoundsCheck(i),
+                        *(attributes->getValueNoBoundsCheck(i)),
+                        true);
           // XXX what to do with nsresult?
         }
       }
       
       return rv;
     }
     case eTreeOpCreateElementNetwork:
     case eTreeOpCreateElementNotNetwork: {
@@ -399,29 +404,36 @@ nsHtml5TreeOperation::Perform(nsHtml5Tre
         return rv;
       }
 
       int32_t len = attributes->getLength();
       for (int32_t i = len; i > 0;) {
         --i;
         // prefix doesn't need regetting. it is always null or a static atom
         // local name is never null
-        nsCOMPtr<nsIAtom> localName = Reget(attributes->getLocalName(i));
+        nsCOMPtr<nsIAtom> localName =
+          Reget(attributes->getLocalNameNoBoundsCheck(i));
         if (ns == kNameSpaceID_XHTML &&
             nsHtml5Atoms::a == name &&
             nsHtml5Atoms::name == localName) {
           // This is an HTML5-incompliant Geckoism.
           // Remove when fixing bug 582361
-          NS_ConvertUTF16toUTF8 cname(*(attributes->getValue(i)));
+          NS_ConvertUTF16toUTF8 cname(*(attributes->getValueNoBoundsCheck(i)));
           NS_ConvertUTF8toUTF16 uv(nsUnescape(cname.BeginWriting()));
-          newContent->SetAttr(attributes->getURI(i), localName,
-              attributes->getPrefix(i), uv, false);
+          newContent->SetAttr(attributes->getURINoBoundsCheck(i),
+                              localName,
+                              attributes->getPrefixNoBoundsCheck(i),
+                              uv,
+                              false);
         } else {
-          newContent->SetAttr(attributes->getURI(i), localName,
-              attributes->getPrefix(i), *(attributes->getValue(i)), false);
+          newContent->SetAttr(attributes->getURINoBoundsCheck(i),
+                              localName,
+                              attributes->getPrefixNoBoundsCheck(i),
+                              *(attributes->getValueNoBoundsCheck(i)),
+                              false);
         }
       }
 
       return rv;
     }
     case eTreeOpSetFormElement: {
       nsIContent* node = *(mOne.node);
       nsIContent* parent = *(mTwo.node);