Unreviewed, rolling out r142118.
authorgavinp@chromium.org <gavinp@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 16:22:49 +0000 (16:22 +0000)
committergavinp@chromium.org <gavinp@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 16:22:49 +0000 (16:22 +0000)
http://trac.webkit.org/changeset/142118
https://bugs.webkit.org/show_bug.cgi?id=109044

Broke SVG! Oh noes!

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::direction):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::mode):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::takeAllChildrenFrom):
* dom/Document.cpp:
(WebCore::Document::setTitle):
* dom/MessagePort.cpp:
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::disentanglePorts):
* editing/DeleteButtonController.cpp:
(WebCore::enclosingDeletableElement):
(WebCore::DeleteButtonController::createDeletionUI):
(WebCore::DeleteButtonController::show):
* editing/EditorCommand.cpp:
(WebCore::unionDOMRanges):
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
(WebCore::ReplacementFragment::removeNode):
(WebCore::ReplacementFragment::insertNodeBefore):
(WebCore::ReplacementFragment::insertFragmentForTestRendering):
(WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
(WebCore::ReplaceSelectionCommand::insertAsListItems):
* editing/SplitTextNodeCommand.cpp:
(WebCore::SplitTextNodeCommand::doUnapply):
* editing/TextIterator.cpp:
(WebCore::CharacterIterator::range):
(WebCore::BackwardsCharacterIterator::range):
(WebCore::TextIterator::rangeFromLocationAndLength):
(WebCore::collapsedToBoundary):
* editing/htmlediting.cpp:
(WebCore::createTabSpanElement):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):
* editing/markup.cpp:
(WebCore::createMarkup):
(WebCore::trimFragment):
(WebCore::createFragmentFromMarkupWithContext):
(WebCore::fillContainerFromString):
(WebCore::createFragmentFromText):
(WebCore::createFragmentFromNodes):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtree):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updatePlaceholderText):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::updatePlaceholderText):
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::addRule):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::dispatchDOMEvent):
* page/DOMSelection.cpp:
(WebCore::DOMSelection::deleteFromDocument):
* page/DragController.cpp:
(WebCore::prepareClipboardForImageDrag):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::visiblePositionForIndex):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::initialBaselineShiftValue):
(WebCore::SVGRenderStyle::initialKerning):
(WebCore::SVGRenderStyle::initialStrokeDashOffset):
(WebCore::SVGRenderStyle::initialStrokeWidth):
* svg/SVGAnimatedLength.cpp:
(WebCore::sharedSVGLength):
(WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
(WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
* svg/SVGAnimatedLengthList.cpp:
(WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
(WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
* svg/SVGLength.cpp:
(WebCore::SVGLength::SVGLength):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::textLengthAnimated):
* svg/animation/SVGSMILElement.cpp:
(WebCore::constructQualifiedName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142126 268f45cc-cd09-0410-ab3c-d52691b4dbfc

35 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBCursor.cpp
Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/MessagePort.cpp
Source/WebCore/editing/DeleteButtonController.cpp
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/SplitTextNodeCommand.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/editing/markup.cpp
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/HTMLOptionsCollection.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/ValidationMessage.cpp
Source/WebCore/html/shadow/MediaControlElementTypes.cpp
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorStyleSheet.cpp
Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
Source/WebCore/page/DOMSelection.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/style/SVGRenderStyle.h
Source/WebCore/svg/SVGAnimatedLength.cpp
Source/WebCore/svg/SVGAnimatedLengthList.cpp
Source/WebCore/svg/SVGLength.cpp
Source/WebCore/svg/SVGTextContentElement.cpp
Source/WebCore/svg/animation/SVGSMILElement.cpp

index 48e2d4e..bed8a4f 100644 (file)
@@ -1,3 +1,104 @@
+2013-02-07  Gavin Peters  <gavinp@chromium.org>
+
+        Unreviewed, rolling out r142118.
+        http://trac.webkit.org/changeset/142118
+        https://bugs.webkit.org/show_bug.cgi?id=109044
+
+        Broke SVG! Oh noes!
+
+        * Modules/indexeddb/IDBCursor.cpp:
+        (WebCore::IDBCursor::direction):
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore):
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::mode):
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::takeAllChildrenFrom):
+        * dom/Document.cpp:
+        (WebCore::Document::setTitle):
+        * dom/MessagePort.cpp:
+        (WebCore::MessagePort::dispatchMessages):
+        (WebCore::MessagePort::disentanglePorts):
+        * editing/DeleteButtonController.cpp:
+        (WebCore::enclosingDeletableElement):
+        (WebCore::DeleteButtonController::createDeletionUI):
+        (WebCore::DeleteButtonController::show):
+        * editing/EditorCommand.cpp:
+        (WebCore::unionDOMRanges):
+        * editing/ReplaceNodeWithSpanCommand.cpp:
+        (WebCore::swapInNodePreservingAttributesAndChildren):
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::ReplacementFragment::ReplacementFragment):
+        (WebCore::ReplacementFragment::removeNode):
+        (WebCore::ReplacementFragment::insertNodeBefore):
+        (WebCore::ReplacementFragment::insertFragmentForTestRendering):
+        (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
+        (WebCore::ReplaceSelectionCommand::insertAsListItems):
+        * editing/SplitTextNodeCommand.cpp:
+        (WebCore::SplitTextNodeCommand::doUnapply):
+        * editing/TextIterator.cpp:
+        (WebCore::CharacterIterator::range):
+        (WebCore::BackwardsCharacterIterator::range):
+        (WebCore::TextIterator::rangeFromLocationAndLength):
+        (WebCore::collapsedToBoundary):
+        * editing/htmlediting.cpp:
+        (WebCore::createTabSpanElement):
+        * editing/mac/EditorMac.mm:
+        (WebCore::Editor::fontForSelection):
+        (WebCore::Editor::fontAttributesForSelectionStart):
+        * editing/markup.cpp:
+        (WebCore::createMarkup):
+        (WebCore::trimFragment):
+        (WebCore::createFragmentFromMarkupWithContext):
+        (WebCore::fillContainerFromString):
+        (WebCore::createFragmentFromText):
+        (WebCore::createFragmentFromNodes):
+        * html/ColorInputType.cpp:
+        (WebCore::ColorInputType::createShadowSubtree):
+        * html/HTMLOptionsCollection.cpp:
+        (WebCore::HTMLOptionsCollection::add):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::updatePlaceholderText):
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
+        (WebCore::HTMLTextFormControlElement::setInnerTextValue):
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::updatePlaceholderText):
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::buildBubbleTree):
+        * html/shadow/MediaControlElementTypes.cpp:
+        (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::getCookies):
+        * inspector/InspectorStyleSheet.cpp:
+        (WebCore::InspectorStyleSheet::addRule):
+        * loader/appcache/ApplicationCacheHost.cpp:
+        (WebCore::ApplicationCacheHost::dispatchDOMEvent):
+        * page/DOMSelection.cpp:
+        (WebCore::DOMSelection::deleteFromDocument):
+        * page/DragController.cpp:
+        (WebCore::prepareClipboardForImageDrag):
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::visiblePositionForIndex):
+        * rendering/style/SVGRenderStyle.h:
+        (WebCore::SVGRenderStyle::initialBaselineShiftValue):
+        (WebCore::SVGRenderStyle::initialKerning):
+        (WebCore::SVGRenderStyle::initialStrokeDashOffset):
+        (WebCore::SVGRenderStyle::initialStrokeWidth):
+        * svg/SVGAnimatedLength.cpp:
+        (WebCore::sharedSVGLength):
+        (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
+        (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
+        * svg/SVGAnimatedLengthList.cpp:
+        (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
+        (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
+        * svg/SVGLength.cpp:
+        (WebCore::SVGLength::SVGLength):
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::textLengthAnimated):
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::constructQualifiedName):
+
 2013-02-07  Kentaro Hara  <haraken@chromium.org>
 
         Remove #if USE(V8) from IDBRequest.h
index 59f6112..7465013 100644 (file)
@@ -95,7 +95,10 @@ IDBCursor::~IDBCursor()
 const String& IDBCursor::direction() const
 {
     IDB_TRACE("IDBCursor::direction");
-    return directionToString(m_direction, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    const AtomicString& direction = directionToString(m_direction, ec);
+    ASSERT(!ec);
+    return direction;
 }
 
 const ScriptValue& IDBCursor::key() const
index 4c58ce3..3436834 100644 (file)
@@ -322,7 +322,9 @@ private:
         EventTarget* target = event->target();
         IDBRequest* request = static_cast<IDBRequest*>(target);
 
-        RefPtr<IDBAny> cursorAny = request->result(ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        RefPtr<IDBAny> cursorAny = request->result(ec);
+        ASSERT(!ec);
         RefPtr<IDBCursorWithValue> cursor;
         if (cursorAny->type() == IDBAny::IDBCursorWithValueType)
             cursor = cursorAny->idbCursorWithValue();
@@ -330,7 +332,8 @@ private:
         Vector<int64_t, 1> indexIds;
         indexIds.append(m_indexMetadata.id);
         if (cursor) {
-            cursor->continueFunction(static_cast<IDBKey*>(0), ASSERT_NO_EXCEPTION);
+            cursor->continueFunction(static_cast<IDBKey*>(0), ec);
+            ASSERT(!ec);
 
             RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey();
             ScriptValue value = cursor->value();
index 02dfe0f..bb60b4e 100644 (file)
@@ -121,7 +121,10 @@ IDBTransaction::~IDBTransaction()
 
 const String& IDBTransaction::mode() const
 {
-    return modeToString(m_mode, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    const AtomicString& mode = modeToString(m_mode, ec);
+    ASSERT(!ec);
+    return mode;
 }
 
 void IDBTransaction::setError(PassRefPtr<DOMError> error, const String& errorMessage)
index 9dd7aa0..277fca0 100644 (file)
@@ -108,10 +108,12 @@ void ContainerNode::takeAllChildrenFrom(ContainerNode* oldParent)
     oldParent->removeDetachedChildren();
 
     for (unsigned i = 0; i < children.size(); ++i) {
+        ExceptionCode ec = 0;
         if (children[i]->attached())
             children[i]->detach();
         // FIXME: We need a no mutation event version of adoptNode.
-        RefPtr<Node> child = document()->adoptNode(children[i].release(), ASSERT_NO_EXCEPTION);
+        RefPtr<Node> child = document()->adoptNode(children[i].release(), ec);
+        ASSERT(!ec);
         parserAppendChild(child.get());
         // FIXME: Together with adoptNode above, the tree scope might get updated recursively twice
         // (if the document changed or oldParent was in a shadow tree, AND *this is in a shadow tree).
index a9fbaa5..6214756 100644 (file)
@@ -1529,7 +1529,9 @@ void Document::setTitle(const String& title)
     else if (!m_titleElement) {
         if (HTMLElement* headElement = head()) {
             m_titleElement = createElement(titleTag, false);
-            headElement->appendChild(m_titleElement, ASSERT_NO_EXCEPTION);
+            ExceptionCode ec = 0;
+            headElement->appendChild(m_titleElement, ec);
+            ASSERT(!ec);
         }
     }
 
index 7cb72ae..95c5a6d 100644 (file)
@@ -186,7 +186,9 @@ void MessagePort::dispatchMessages()
         OwnPtr<MessagePortArray> ports = MessagePort::entanglePorts(*m_scriptExecutionContext, eventData->channels());
         RefPtr<Event> evt = MessageEvent::create(ports.release(), eventData->message());
 
-        dispatchEvent(evt.release(), ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        dispatchEvent(evt.release(), ec);
+        ASSERT(!ec);
     }
 }
 
@@ -227,7 +229,8 @@ PassOwnPtr<MessagePortChannelArray> MessagePort::disentanglePorts(const MessageP
     // Passed-in ports passed validity checks, so we can disentangle them.
     OwnPtr<MessagePortChannelArray> portArray = adoptPtr(new MessagePortChannelArray(ports->size()));
     for (unsigned int i = 0 ; i < ports->size() ; ++i) {
-        OwnPtr<MessagePortChannel> channel = (*ports)[i]->disentangle(ASSERT_NO_EXCEPTION); // Can't generate exception here if passed above checks.
+        OwnPtr<MessagePortChannel> channel = (*ports)[i]->disentangle(ec);
+        ASSERT(!ec); // Can't generate exception here if passed above checks.
         (*portArray)[i] = channel.release();
     }
     return portArray.release();
index 90d253e..c0da246 100644 (file)
@@ -155,8 +155,10 @@ static HTMLElement* enclosingDeletableElement(const VisibleSelection& selection)
     if (!range)
         return 0;
 
-    Node* container = range->commonAncestorContainer(ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    Node* container = range->commonAncestorContainer(ec);
     ASSERT(container);
+    ASSERT(ec == 0);
 
     // The enclosingNodeOfType function only works on nodes that are editable
     // (which is strange, given its name).
@@ -232,7 +234,7 @@ void DeleteButtonController::createDeletionUI()
 
     ExceptionCode ec = 0;
     container->appendChild(outline.get(), ec);
-    ASSERT(!ec);
+    ASSERT(ec == 0);
     if (ec)
         return;
 
@@ -264,7 +266,7 @@ void DeleteButtonController::createDeletionUI()
     button->setCachedImage(new CachedImage(buttonImage.get()));
 
     container->appendChild(button.get(), ec);
-    ASSERT(!ec);
+    ASSERT(ec == 0);
     if (ec)
         return;
 
@@ -298,7 +300,7 @@ void DeleteButtonController::show(HTMLElement* element)
 
     ExceptionCode ec = 0;
     m_target->appendChild(m_containerElement.get(), ec);
-    ASSERT(!ec);
+    ASSERT(ec == 0);
     if (ec) {
         hide();
         return;
index 256a5b3..4733249 100644 (file)
@@ -266,8 +266,11 @@ static unsigned verticalScrollDistance(Frame* frame)
 
 static RefPtr<Range> unionDOMRanges(Range* a, Range* b)
 {
-    Range* start = a->compareBoundaryPoints(Range::START_TO_START, b, ASSERT_NO_EXCEPTION) <= 0 ? a : b;
-    Range* end = a->compareBoundaryPoints(Range::END_TO_END, b, ASSERT_NO_EXCEPTION) <= 0 ? b : a;
+    ExceptionCode ec = 0;
+    Range* start = a->compareBoundaryPoints(Range::START_TO_START, b, ec) <= 0 ? a : b;
+    ASSERT(!ec);
+    Range* end = a->compareBoundaryPoints(Range::END_TO_END, b, ec) <= 0 ? b : a;
+    ASSERT(!ec);
 
     return Range::create(a->ownerDocument(), start->startContainer(), start->startOffset(), end->endContainer(), end->endOffset());
 }
index f507d28..8712304 100644 (file)
@@ -51,18 +51,23 @@ ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand(PassRefPtr<HTMLElement> e
 static void swapInNodePreservingAttributesAndChildren(HTMLElement* newNode, HTMLElement* nodeToReplace)
 {
     ASSERT(nodeToReplace->inDocument());
+    ExceptionCode ec = 0;
     RefPtr<ContainerNode> parentNode = nodeToReplace->parentNode();
-    parentNode->insertBefore(newNode, nodeToReplace, ASSERT_NO_EXCEPTION);
+    parentNode->insertBefore(newNode, nodeToReplace, ec);
+    ASSERT(!ec);
 
     NodeVector children;
     getChildNodes(nodeToReplace, children);
-    for (size_t i = 0; i < children.size(); ++i)
-        newNode->appendChild(children[i], ASSERT_NO_EXCEPTION);
+    for (size_t i = 0; i < children.size(); ++i) {
+        newNode->appendChild(children[i], ec);
+        ASSERT(!ec);
+    }
 
     // FIXME: Fix this to send the proper MutationRecords when MutationObservers are present.
     newNode->cloneDataFromElement(*nodeToReplace);
 
-    parentNode->removeChild(nodeToReplace, ASSERT_NO_EXCEPTION);
+    parentNode->removeChild(nodeToReplace, ec);
+    ASSERT(!ec);
 }
 
 void ReplaceNodeWithSpanCommand::doApply()
index a94eb10..4ade68a 100644 (file)
@@ -181,7 +181,9 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f
 
     // Give the root a chance to change the text.
     RefPtr<BeforeTextInsertedEvent> evt = BeforeTextInsertedEvent::create(text);
-    editableRoot->dispatchEvent(evt, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    editableRoot->dispatchEvent(evt, ec);
+    ASSERT(ec == 0);
     if (text != evt->text() || !editableRoot->rendererIsRichlyEditable()) {
         restoreAndRemoveTestRenderingNodesToFragment(holder.get());
 
@@ -232,7 +234,9 @@ void ReplacementFragment::removeNode(PassRefPtr<Node> node)
     if (!parent)
         return;
     
-    parent->removeChild(node.get(), ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    parent->removeChild(node.get(), ec);
+    ASSERT(ec == 0);
 }
 
 void ReplacementFragment::insertNodeBefore(PassRefPtr<Node> node, Node* refNode)
@@ -244,15 +248,23 @@ void ReplacementFragment::insertNodeBefore(PassRefPtr<Node> node, Node* refNode)
     if (!parent)
         return;
         
-    parent->insertBefore(node, refNode, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    parent->insertBefore(node, refNode, ec);
+    ASSERT(ec == 0);
 }
 
 PassRefPtr<StyledElement> ReplacementFragment::insertFragmentForTestRendering(Node* rootEditableElement)
 {
     RefPtr<StyledElement> holder = createDefaultParagraphElement(m_document.get());
+    
+    ExceptionCode ec = 0;
+
+    holder->appendChild(m_fragment, ec);
+    ASSERT(ec == 0);
+
+    rootEditableElement->appendChild(holder.get(), ec);
+    ASSERT(ec == 0);
 
-    holder->appendChild(m_fragment, ASSERT_NO_EXCEPTION);
-    rootEditableElement->appendChild(holder.get(), ASSERT_NO_EXCEPTION);
     m_document->updateLayoutIgnorePendingStylesheets();
 
     return holder.release();
@@ -263,9 +275,12 @@ void ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment(StyledEle
     if (!holder)
         return;
     
+    ExceptionCode ec = 0;
     while (RefPtr<Node> node = holder->firstChild()) {
-        holder->removeChild(node.get(), ASSERT_NO_EXCEPTION);
-        m_fragment->appendChild(node.get(), ASSERT_NO_EXCEPTION);
+        holder->removeChild(node.get(), ec);
+        ASSERT(ec == 0);
+        m_fragment->appendChild(node.get(), ec);
+        ASSERT(ec == 0);
     }
 
     removeNode(holder);
@@ -1303,7 +1318,9 @@ Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<HTMLElement> prpList
     }
 
     while (RefPtr<Node> listItem = listElement->firstChild()) {
-        listElement->removeChild(listItem.get(), ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        listElement->removeChild(listItem.get(), ec);
+        ASSERT(!ec);
         if (isStart || isMiddle) {
             insertNodeBefore(listItem, lastNode);
             insertedNodes.respondToNodeInsertion(listItem.get());
index cf07df3..0eeca6a 100644 (file)
@@ -75,10 +75,12 @@ void SplitTextNodeCommand::doUnapply()
 
     String prefixText = m_text1->data();
 
-    m_text2->insertData(0, prefixText, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    m_text2->insertData(0, prefixText, ec);
+    ASSERT(!ec);
 
     document()->markers()->copyMarkers(m_text1.get(), 0, prefixText.length(), m_text2.get(), 0);
-    m_text1->remove(ASSERT_NO_EXCEPTION);
+    m_text1->remove(ec);
 }
 
 void SplitTextNodeCommand::doReapply()
index e2b1e2e..b6b001b 100644 (file)
@@ -1418,8 +1418,10 @@ PassRefPtr<Range> CharacterIterator::range() const
             Node* n = r->startContainer();
             ASSERT(n == r->endContainer());
             int offset = r->startOffset() + m_runOffset;
-            r->setStart(n, offset, ASSERT_NO_EXCEPTION);
-            r->setEnd(n, offset + 1, ASSERT_NO_EXCEPTION);
+            ExceptionCode ec = 0;
+            r->setStart(n, offset, ec);
+            r->setEnd(n, offset + 1, ec);
+            ASSERT(!ec);
         }
     }
     return r.release();
@@ -1524,8 +1526,10 @@ PassRefPtr<Range> BackwardsCharacterIterator::range() const
             Node* n = r->startContainer();
             ASSERT(n == r->endContainer());
             int offset = r->endOffset() - m_runOffset;
-            r->setStart(n, offset - 1, ASSERT_NO_EXCEPTION);
-            r->setEnd(n, offset, ASSERT_NO_EXCEPTION);
+            ExceptionCode ec = 0;
+            r->setStart(n, offset - 1, ec);
+            r->setEnd(n, offset, ec);
+            ASSERT(!ec);
         }
     }
     return r.release();
@@ -2436,8 +2440,11 @@ PassRefPtr<Range> TextIterator::rangeFromLocationAndLength(ContainerNode* scope,
     if (rangeLocation == 0 && rangeLength == 0 && it.atEnd()) {
         textRunRange = it.range();
         
-        resultRange->setStart(textRunRange->startContainer(), 0, ASSERT_NO_EXCEPTION);
-        resultRange->setEnd(textRunRange->startContainer(), 0, ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        resultRange->setStart(textRunRange->startContainer(), 0, ec);
+        ASSERT(!ec);
+        resultRange->setEnd(textRunRange->startContainer(), 0, ec);
+        ASSERT(!ec);
         
         return resultRange.release();
     }
@@ -2459,12 +2466,17 @@ PassRefPtr<Range> TextIterator::rangeFromLocationAndLength(ContainerNode* scope,
                 it.advance();
                 if (!it.atEnd()) {
                     RefPtr<Range> range = it.range();
-                    textRunRange->setEnd(range->startContainer(), range->startOffset(), ASSERT_NO_EXCEPTION);
+                    ExceptionCode ec = 0;
+                    textRunRange->setEnd(range->startContainer(), range->startOffset(), ec);
+                    ASSERT(!ec);
                 } else {
                     Position runStart = textRunRange->startPosition();
                     Position runEnd = VisiblePosition(runStart).next().deepEquivalent();
-                    if (runEnd.isNotNull())
-                        textRunRange->setEnd(runEnd.containerNode(), runEnd.computeOffsetInContainerNode(), ASSERT_NO_EXCEPTION);
+                    if (runEnd.isNotNull()) {
+                        ExceptionCode ec = 0;
+                        textRunRange->setEnd(runEnd.containerNode(), runEnd.computeOffsetInContainerNode(), ec);
+                        ASSERT(!ec);
+                    }
                 }
             }
         }
@@ -2586,8 +2598,11 @@ static inline bool isAllCollapsibleWhitespace(const String& string)
 
 static PassRefPtr<Range> collapsedToBoundary(const Range* range, bool forward)
 {
-    RefPtr<Range> result = range->cloneRange(ASSERT_NO_EXCEPTION);
-    result->collapse(!forward, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    RefPtr<Range> result = range->cloneRange(ec);
+    ASSERT(!ec);
+    result->collapse(!forward, ec);
+    ASSERT(!ec);
     return result.release();
 }
 
index 19fb3f2..96ef863 100644 (file)
@@ -939,7 +939,9 @@ PassRefPtr<Element> createTabSpanElement(Document* document, PassRefPtr<Node> pr
     if (!tabTextNode)
         tabTextNode = document->createEditingTextNode("\t");
 
-    spanElement->appendChild(tabTextNode.release(), ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    spanElement->appendChild(tabTextNode.release(), ec);
+    ASSERT(ec == 0);
 
     return spanElement.release();
 }
index 8c3355a..037e48a 100644 (file)
@@ -153,8 +153,11 @@ const SimpleFontData* Editor::fontForSelection(bool& hasMultipleFonts) const
         if (style)
             result = style->font().primaryFont();
 
-        if (nodeToRemove)
-            nodeToRemove->remove(ASSERT_NO_EXCEPTION);
+        if (nodeToRemove) {
+            ExceptionCode ec;
+            nodeToRemove->remove(ec);
+            ASSERT(!ec);
+        }
 
         return result;
     }
@@ -239,8 +242,11 @@ NSDictionary* Editor::fontAttributesForSelectionStart() const
     if (decoration & UNDERLINE)
         [result setObject:[NSNumber numberWithInt:NSUnderlineStyleSingle] forKey:NSUnderlineStyleAttributeName];
 
-    if (nodeToRemove)
-        nodeToRemove->remove(ASSERT_NO_EXCEPTION);
+    if (nodeToRemove) {
+        ExceptionCode ec = 0;
+        nodeToRemove->remove(ec);
+        ASSERT(ec == 0);
+    }
 
     return result;
 }
index f20c5fb..12fbcda 100644 (file)
@@ -564,10 +564,13 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc
     if (deleteButton)
         deleteButton->disable();
 
-    bool collapsed = updatedRange->collapsed(ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    bool collapsed = updatedRange->collapsed(ec);
+    ASSERT(!ec);
     if (collapsed)
         return "";
-    Node* commonAncestor = updatedRange->commonAncestorContainer(ASSERT_NO_EXCEPTION);
+    Node* commonAncestor = updatedRange->commonAncestorContainer(ec);
+    ASSERT(!ec);
     if (!commonAncestor)
         return "";
 
@@ -595,11 +598,14 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc
         accumulator.appendString(interchangeNewlineString);
         startNode = visibleStart.next().deepEquivalent().deprecatedNode();
 
-        if (pastEnd && Range::compareBoundaryPoints(startNode, 0, pastEnd, 0, ASSERT_NO_EXCEPTION) >= 0) {
+        ExceptionCode ec = 0;
+        if (pastEnd && Range::compareBoundaryPoints(startNode, 0, pastEnd, 0, ec) >= 0) {
+            ASSERT(!ec);
             if (deleteButton)
                 deleteButton->enable();
             return interchangeNewlineString;
         }
+        ASSERT(!ec);
     }
 
     Node* lastClosed = accumulator.serializeNodes(startNode, pastEnd);
@@ -687,6 +693,7 @@ static bool findNodesSurroundingContext(Document* document, RefPtr<Node>& nodeBe
 
 static void trimFragment(DocumentFragment* fragment, Node* nodeBeforeContext, Node* nodeAfterContext)
 {
+    ExceptionCode ec = 0;
     RefPtr<Node> next;
     for (RefPtr<Node> node = fragment->firstChild(); node; node = next) {
         if (nodeBeforeContext->isDescendantOf(node.get())) {
@@ -695,7 +702,7 @@ static void trimFragment(DocumentFragment* fragment, Node* nodeBeforeContext, No
         }
         next = NodeTraversal::nextSkippingChildren(node.get());
         ASSERT(!node->contains(nodeAfterContext));
-        node->parentNode()->removeChild(node.get(), ASSERT_NO_EXCEPTION);
+        node->parentNode()->removeChild(node.get(), ec);
         if (nodeBeforeContext == node)
             break;
     }
@@ -703,7 +710,8 @@ static void trimFragment(DocumentFragment* fragment, Node* nodeBeforeContext, No
     ASSERT(nodeAfterContext->parentNode());
     for (RefPtr<Node> node = nodeAfterContext; node; node = next) {
         next = NodeTraversal::nextSkippingChildren(node.get());
-        node->parentNode()->removeChild(node.get(), ASSERT_NO_EXCEPTION);
+        node->parentNode()->removeChild(node.get(), ec);
+        ASSERT(!ec);
     }
 }
 
@@ -733,16 +741,19 @@ PassRefPtr<DocumentFragment> createFragmentFromMarkupWithContext(Document* docum
         positionAfterNode(nodeBeforeContext.get()).parentAnchoredEquivalent(),
         positionBeforeNode(nodeAfterContext.get()).parentAnchoredEquivalent());
 
-    Node* commonAncestor = range->commonAncestorContainer(ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    Node* commonAncestor = range->commonAncestorContainer(ec);
+    ASSERT(!ec);
     Node* specialCommonAncestor = ancestorToRetainStructureAndAppearanceWithNoRenderer(commonAncestor);
 
     // When there's a special common ancestor outside of the fragment, we must include it as well to
     // preserve the structure and appearance of the fragment. For example, if the fragment contains
     // TD, we need to include the enclosing TABLE tag as well.
     RefPtr<DocumentFragment> fragment = DocumentFragment::create(document);
-    if (specialCommonAncestor)
-        fragment->appendChild(specialCommonAncestor, ASSERT_NO_EXCEPTION);
-    else
+    if (specialCommonAncestor) {
+        fragment->appendChild(specialCommonAncestor, ec);
+        ASSERT(!ec);
+    } else
         fragment->takeAllChildrenFrom(static_cast<ContainerNode*>(commonAncestor));
 
     trimFragment(fragment.get(), nodeBeforeContext.get(), nodeAfterContext.get());
@@ -770,8 +781,10 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
 {
     Document* document = paragraph->document();
 
+    ExceptionCode ec = 0;
     if (string.isEmpty()) {
-        paragraph->appendChild(createBlockPlaceholderElement(document), ASSERT_NO_EXCEPTION);
+        paragraph->appendChild(createBlockPlaceholderElement(document), ec);
+        ASSERT(!ec);
         return;
     }
 
@@ -788,20 +801,24 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
         // append the non-tab textual part
         if (!s.isEmpty()) {
             if (!tabText.isEmpty()) {
-                paragraph->appendChild(createTabSpanElement(document, tabText), ASSERT_NO_EXCEPTION);
+                paragraph->appendChild(createTabSpanElement(document, tabText), ec);
+                ASSERT(!ec);
                 tabText = emptyString();
             }
             RefPtr<Node> textNode = document->createTextNode(stringWithRebalancedWhitespace(s, first, i + 1 == numEntries));
-            paragraph->appendChild(textNode.release(), ASSERT_NO_EXCEPTION);
+            paragraph->appendChild(textNode.release(), ec);
+            ASSERT(!ec);
         }
 
         // there is a tab after every entry, except the last entry
         // (if the last character is a tab, the list gets an extra empty entry)
         if (i + 1 != numEntries)
             tabText.append('\t');
-        else if (!tabText.isEmpty())
-            paragraph->appendChild(createTabSpanElement(document, tabText), ASSERT_NO_EXCEPTION);
-
+        else if (!tabText.isEmpty()) {
+            paragraph->appendChild(createTabSpanElement(document, tabText), ec);
+            ASSERT(!ec);
+        }
+        
         first = false;
     }
 }
@@ -839,13 +856,16 @@ PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String
     string.replace("\r\n", "\n");
     string.replace('\r', '\n');
 
+    ExceptionCode ec = 0;
     RenderObject* renderer = styleNode->renderer();
     if (renderer && renderer->style()->preserveNewline()) {
-        fragment->appendChild(document->createTextNode(string), ASSERT_NO_EXCEPTION);
+        fragment->appendChild(document->createTextNode(string), ec);
+        ASSERT(!ec);
         if (string.endsWith('\n')) {
             RefPtr<Element> element = createBreakElement(document);
             element->setAttribute(classAttr, AppleInterchangeNewline);            
-            fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
+            fragment->appendChild(element.release(), ec);
+            ASSERT(!ec);
         }
         return fragment.release();
     }
@@ -887,7 +907,8 @@ PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String
                 element = createDefaultParagraphElement(document);
             fillContainerFromString(element.get(), s);
         }
-        fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
+        fragment->appendChild(element.release(), ec);
+        ASSERT(!ec);
     }
     return fragment.release();
 }
@@ -903,11 +924,14 @@ PassRefPtr<DocumentFragment> createFragmentFromNodes(Document *document, const V
 
     RefPtr<DocumentFragment> fragment = document->createDocumentFragment();
 
+    ExceptionCode ec = 0;
     size_t size = nodes.size();
     for (size_t i = 0; i < size; ++i) {
         RefPtr<Element> element = createDefaultParagraphElement(document);
-        element->appendChild(nodes[i], ASSERT_NO_EXCEPTION);
-        fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
+        element->appendChild(nodes[i], ec);
+        ASSERT(!ec);
+        fragment->appendChild(element.release(), ec);
+        ASSERT(!ec);
     }
 
     if (document->frame())
index 07fa1bb..49063b3 100644 (file)
@@ -126,8 +126,11 @@ void ColorInputType::createShadowSubtree()
     wrapperElement->setPseudo(AtomicString("-webkit-color-swatch-wrapper", AtomicString::ConstructFromLiteral));
     RefPtr<HTMLDivElement> colorSwatch = HTMLDivElement::create(document);
     colorSwatch->setPseudo(AtomicString("-webkit-color-swatch", AtomicString::ConstructFromLiteral));
-    wrapperElement->appendChild(colorSwatch.release(), ASSERT_NO_EXCEPTION);
-    element()->userAgentShadowRoot()->appendChild(wrapperElement.release(), ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    wrapperElement->appendChild(colorSwatch.release(), ec);
+    ASSERT(!ec);
+    element()->userAgentShadowRoot()->appendChild(wrapperElement.release(), ec);
+    ASSERT(!ec);
     
     updateColorSwatch();
 }
index f2942a2..d7c267b 100644 (file)
@@ -65,7 +65,7 @@ void HTMLOptionsCollection::add(PassRefPtr<HTMLOptionElement> element, int index
     else
         select->add(newOption, static_cast<HTMLOptionElement*>(item(index)), ec);
 
-    ASSERT(!ec);
+    ASSERT(ec == 0);
 }
 
 void HTMLOptionsCollection::remove(int index)
index bfff4bf..7618a33 100644 (file)
@@ -539,10 +539,12 @@ bool HTMLTextAreaElement::matchesReadWritePseudoClass() const
 
 void HTMLTextAreaElement::updatePlaceholderText()
 {
+    ExceptionCode ec = 0;
     String placeholderText = strippedPlaceholder();
     if (placeholderText.isEmpty()) {
         if (m_placeholder) {
-            userAgentShadowRoot()->removeChild(m_placeholder, ASSERT_NO_EXCEPTION);
+            userAgentShadowRoot()->removeChild(m_placeholder, ec);
+            ASSERT(!ec);
             m_placeholder = 0;
         }
         return;
@@ -551,9 +553,11 @@ void HTMLTextAreaElement::updatePlaceholderText()
         RefPtr<HTMLDivElement> placeholder = HTMLDivElement::create(document());
         m_placeholder = placeholder.get();
         m_placeholder->setPseudo(AtomicString("-webkit-input-placeholder", AtomicString::ConstructFromLiteral));
-        userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->nextSibling(), ASSERT_NO_EXCEPTION);
+        userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->nextSibling(), ec);
+        ASSERT(!ec);
     }
-    m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION);
+    m_placeholder->setInnerText(placeholderText, ec);
+    ASSERT(!ec);
     fixPlaceholderRenderer(m_placeholder, innerTextElement());
 }
 
index 9739523..62f4a16 100644 (file)
@@ -350,9 +350,12 @@ int HTMLTextFormControlElement::indexForVisiblePosition(const VisiblePosition& p
     Position indexPosition = pos.deepEquivalent().parentAnchoredEquivalent();
     if (enclosingTextFormControl(indexPosition) != this)
         return 0;
+    ExceptionCode ec = 0;
     RefPtr<Range> range = Range::create(indexPosition.document());
-    range->setStart(innerTextElement(), 0, ASSERT_NO_EXCEPTION);
-    range->setEnd(indexPosition.containerNode(), indexPosition.offsetInContainerNode(), ASSERT_NO_EXCEPTION);
+    range->setStart(innerTextElement(), 0, ec);
+    ASSERT(!ec);
+    range->setEnd(indexPosition.containerNode(), indexPosition.offsetInContainerNode(), ec);
+    ASSERT(!ec);
     return TextIterator::rangeLength(range.get());
 }
 
@@ -536,10 +539,14 @@ void HTMLTextFormControlElement::setInnerTextValue(const String& value)
         if (textIsChanged && document() && renderer() && AXObjectCache::accessibilityEnabled())
             document()->axObjectCache()->postNotification(this, AXObjectCache::AXValueChanged, false);
 
-        innerTextElement()->setInnerText(value, ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        innerTextElement()->setInnerText(value, ec);
+        ASSERT(!ec);
 
-        if (value.endsWith('\n') || value.endsWith('\r'))
-            innerTextElement()->appendChild(HTMLBRElement::create(document()), ASSERT_NO_EXCEPTION);
+        if (value.endsWith('\n') || value.endsWith('\r')) {
+            innerTextElement()->appendChild(HTMLBRElement::create(document()), ec);
+            ASSERT(!ec);
+        }
     }
 
     setFormControlValueMatchesRenderer(true);
index 58f2aa4..02ef2d5 100644 (file)
@@ -406,10 +406,12 @@ void TextFieldInputType::updatePlaceholderText()
 {
     if (!supportsPlaceholder())
         return;
+    ExceptionCode ec = 0;
     String placeholderText = element()->strippedPlaceholder();
     if (placeholderText.isEmpty()) {
         if (m_placeholder) {
-            m_placeholder->parentNode()->removeChild(m_placeholder.get(), ASSERT_NO_EXCEPTION);
+            m_placeholder->parentNode()->removeChild(m_placeholder.get(), ec);
+            ASSERT(!ec);
             m_placeholder.clear();
         }
         return;
@@ -417,9 +419,11 @@ void TextFieldInputType::updatePlaceholderText()
     if (!m_placeholder) {
         m_placeholder = HTMLDivElement::create(element()->document());
         m_placeholder->setPseudo(AtomicString("-webkit-input-placeholder", AtomicString::ConstructFromLiteral));
-        element()->userAgentShadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling(), ASSERT_NO_EXCEPTION);
+        element()->userAgentShadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling(), ec);
+        ASSERT(!ec);
     }
-    m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION);
+    m_placeholder->setInnerText(placeholderText, ec);
+    ASSERT(!ec);
     element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_container.get() : m_innerText.get());
 }
 
index 39d5625..a6343f9 100644 (file)
@@ -183,7 +183,9 @@ void ValidationMessage::buildBubbleTree(Timer<ValidationMessage>*)
     // Need to force position:absolute because RenderMenuList doesn't assume it
     // contains non-absolute or non-fixed renderers as children.
     m_bubble->setInlineStyleProperty(CSSPropertyPosition, CSSValueAbsolute);
-    shadowRoot->appendChild(m_bubble.get(), ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    shadowRoot->appendChild(m_bubble.get(), ec);
+    ASSERT(!ec);
     m_element->document()->updateLayout();
     adjustBubblePosition(m_element->boundingBox(), m_bubble.get());
 
@@ -191,8 +193,10 @@ void ValidationMessage::buildBubbleTree(Timer<ValidationMessage>*)
     clipper->setPseudo(AtomicString("-webkit-validation-bubble-arrow-clipper", AtomicString::ConstructFromLiteral));
     RefPtr<HTMLDivElement> bubbleArrow = HTMLDivElement::create(doc);
     bubbleArrow->setPseudo(AtomicString("-webkit-validation-bubble-arrow", AtomicString::ConstructFromLiteral));
-    clipper->appendChild(bubbleArrow.release(), ASSERT_NO_EXCEPTION);
-    m_bubble->appendChild(clipper.release(), ASSERT_NO_EXCEPTION);
+    clipper->appendChild(bubbleArrow.release(), ec);
+    ASSERT(!ec);
+    m_bubble->appendChild(clipper.release(), ec);
+    ASSERT(!ec);
 
     RefPtr<HTMLElement> message = HTMLDivElement::create(doc);
     message->setPseudo(AtomicString("-webkit-validation-bubble-message", AtomicString::ConstructFromLiteral));
index a043134..98d801b 100644 (file)
@@ -293,8 +293,11 @@ void MediaControlVolumeSliderElement::defaultEventHandler(Event* event)
         return;
 
     float volume = narrowPrecisionToFloat(value().toDouble());
-    if (volume != mediaController()->volume())
-        mediaController()->setVolume(volume, ASSERT_NO_EXCEPTION);
+    if (volume != mediaController()->volume()) {
+        ExceptionCode ec = 0;
+        mediaController()->setVolume(volume, ec);
+        ASSERT(!ec);
+    }
     if (m_clearMutedOnUserInteraction)
         mediaController()->setMuted(false);
 }
index 9413527..e673a00 100644 (file)
@@ -546,10 +546,11 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type
             rawCookiesImplemented = getRawCookies(document, KURL(ParsedURLString, *it), docCookiesList);
             if (!rawCookiesImplemented) {
                 // FIXME: We need duplication checking for the String representation of cookies.
-                //
+                ExceptionCode ec = 0;
+                stringCookiesList.append(document->cookie(ec));
                 // Exceptions are thrown by cookie() in sandboxed frames. That won't happen here
                 // because "document" is the document of the main frame of the page.
-                stringCookiesList.append(document->cookie(ASSERT_NO_EXCEPTION));
+                ASSERT(!ec);
             } else {
                 int cookiesSize = docCookiesList.size();
                 for (int i = 0; i < cookiesSize; i++) {
index daacb97..63e639e 100644 (file)
@@ -862,7 +862,8 @@ CSSStyleRule* InspectorStyleSheet::addRule(const String& selector, ExceptionCode
     if (!styleRule) {
         // What we just added has to be a CSSStyleRule - we cannot handle other types of rules yet.
         // If it is not a style rule, pretend we never touched the stylesheet.
-        m_pageStyleSheet->deleteRule(lastRuleIndex, ASSERT_NO_EXCEPTION);
+        m_pageStyleSheet->deleteRule(lastRuleIndex, ec);
+        ASSERT(!ec);
         ec = SYNTAX_ERR;
         return 0;
     }
index 18fce65..513f066 100644 (file)
@@ -308,12 +308,14 @@ void ApplicationCacheHost::dispatchDOMEvent(EventID id, int total, int done)
 {
     if (m_domApplicationCache) {
         const AtomicString& eventType = DOMApplicationCache::toEventType(id);
+        ExceptionCode ec = 0;
         RefPtr<Event> event;
         if (id == PROGRESS_EVENT)
             event = ProgressEvent::create(eventType, true, done, total);
         else
             event = Event::create(eventType, false, false);
-        m_domApplicationCache->dispatchEvent(event, ASSERT_NO_EXCEPTION);
+        m_domApplicationCache->dispatchEvent(event, ec);
+        ASSERT(!ec);
     }
 }
 
index 2d3192b..e2d771a 100644 (file)
@@ -438,9 +438,12 @@ void DOMSelection::deleteFromDocument()
     if (!selectedRange)
         return;
 
-    selectedRange->deleteContents(ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    selectedRange->deleteContents(ec);
+    ASSERT(!ec);
 
-    setBaseAndExtent(selectedRange->startContainer(ASSERT_NO_EXCEPTION), selectedRange->startOffset(), selectedRange->startContainer(), selectedRange->startOffset(), ASSERT_NO_EXCEPTION);
+    setBaseAndExtent(selectedRange->startContainer(ec), selectedRange->startOffset(), selectedRange->startContainer(), selectedRange->startOffset(), ec);
+    ASSERT(!ec);
 }
 
 bool DOMSelection::containsNode(const Node* n, bool allowPartial) const
index e171653..1032283 100644 (file)
@@ -701,7 +701,9 @@ static void prepareClipboardForImageDrag(Frame* source, Clipboard* clipboard, El
 {
     if (node->isContentRichlyEditable()) {
         RefPtr<Range> range = source->document()->createRange();
-        range->selectNode(node, ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        range->selectNode(node, ec);
+        ASSERT(!ec);
         source->selection()->setSelection(VisibleSelection(range.get(), DOWNSTREAM));
     }
     clipboard->declareAndWriteDragImage(node, !linkURL.isEmpty() ? linkURL : imageURL, label, source);
index c7c5768..f93addb 100644 (file)
@@ -129,8 +129,10 @@ VisiblePosition RenderTextControl::visiblePositionForIndex(int index) const
 {
     if (index <= 0)
         return VisiblePosition(firstPositionInNode(innerTextElement()), DOWNSTREAM);
+    ExceptionCode ec = 0;
     RefPtr<Range> range = Range::create(document());
-    range->selectNodeContents(innerTextElement(), ASSERT_NO_EXCEPTION);
+    range->selectNodeContents(innerTextElement(), ec);
+    ASSERT(!ec);
     CharacterIterator it(range.get());
     it.advance(index - 1);
     return VisiblePosition(it.range()->endPosition(), UPSTREAM);
index ee69db6..be0a479 100644 (file)
@@ -26,7 +26,6 @@
 #if ENABLE(SVG)
 #include "CSSValueList.h"
 #include "DataRef.h"
-#include "ExceptionCodePlaceholder.h"
 #include "GraphicsTypes.h"
 #include "Path.h"
 #include "RenderStyleConstants.h"
@@ -98,28 +97,36 @@ public:
     static SVGLength initialBaselineShiftValue()
     {
         SVGLength length;
-        length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        length.newValueSpecifiedUnits(LengthTypeNumber, 0, ec);
+        ASSERT(!ec);
         return length;
     }
 
     static SVGLength initialKerning()
     {
         SVGLength length;
-        length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        length.newValueSpecifiedUnits(LengthTypeNumber, 0, ec);
+        ASSERT(!ec);
         return length;
     }
 
     static SVGLength initialStrokeDashOffset()
     {
         SVGLength length;
-        length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        length.newValueSpecifiedUnits(LengthTypeNumber, 0, ec);
+        ASSERT(!ec);
         return length;
     }
 
     static SVGLength initialStrokeWidth()
     {
         SVGLength length;
-        length.newValueSpecifiedUnits(LengthTypeNumber, 1, ASSERT_NO_EXCEPTION);
+        ExceptionCode ec = 0;
+        length.newValueSpecifiedUnits(LengthTypeNumber, 1, ec);
+        ASSERT(!ec);
         return length;
     }
 
index 0ac8bf0..7c26ebd 100644 (file)
@@ -36,7 +36,9 @@ SVGAnimatedLengthAnimator::SVGAnimatedLengthAnimator(SVGAnimationElement* animat
 static inline SVGLength& sharedSVGLength(SVGLengthMode mode, const String& valueAsString)
 {
     DEFINE_STATIC_LOCAL(SVGLength, sharedLength, ());
-    sharedLength.setValueAsString(valueAsString, mode, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    sharedLength.setValueAsString(valueAsString, mode, ec);
+    ASSERT(!ec);
     return sharedLength;
 }
 
@@ -79,7 +81,9 @@ void SVGAnimatedLengthAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGAnima
     const SVGLength& fromLength = from->length();
     SVGLength& toLength = to->length();
 
-    toLength.setValue(toLength.value(lengthContext) + fromLength.value(lengthContext), lengthContext, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    toLength.setValue(toLength.value(lengthContext) + fromLength.value(lengthContext), lengthContext, ec);
+    ASSERT(!ec);
 }
 
 static SVGLength parseLengthFromString(SVGAnimationElement* animationElement, const String& string)
@@ -106,7 +110,9 @@ void SVGAnimatedLengthAnimator::calculateAnimatedValue(float percentage, unsigne
     SVGLengthType unitType = percentage < 0.5 ? fromSVGLength.unitType() : toSVGLength.unitType();
     m_animationElement->animateAdditiveNumber(percentage, repeatCount, fromSVGLength.value(lengthContext), toSVGLength.value(lengthContext), toAtEndOfDurationSVGLength.value(lengthContext), animatedNumber);
 
-    animatedSVGLength.setValue(lengthContext, animatedNumber, m_lengthMode, unitType, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    animatedSVGLength.setValue(lengthContext, animatedNumber, m_lengthMode, unitType, ec);
+    ASSERT(!ec);
 }
 
 float SVGAnimatedLengthAnimator::calculateDistance(const String& fromString, const String& toString)
index b6a23ac..812b90a 100644 (file)
@@ -78,8 +78,11 @@ void SVGAnimatedLengthListAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGA
         return;
 
     SVGLengthContext lengthContext(m_contextElement);
-    for (unsigned i = 0; i < fromLengthListSize; ++i)
-        toLengthList[i].setValue(toLengthList[i].value(lengthContext) + fromLengthList[i].value(lengthContext), lengthContext, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    for (unsigned i = 0; i < fromLengthListSize; ++i) {
+        toLengthList[i].setValue(toLengthList[i].value(lengthContext) + fromLengthList[i].value(lengthContext), lengthContext, ec);
+        ASSERT(!ec);
+    }
 }
 
 static SVGLengthList parseLengthListFromString(SVGAnimationElement* animationElement, const String& string)
@@ -111,6 +114,7 @@ void SVGAnimatedLengthListAnimator::calculateAnimatedValue(float percentage, uns
     unsigned toAtEndOfDurationListSize = toAtEndOfDurationLengthList.size();
 
     SVGLengthContext lengthContext(m_contextElement);
+    ExceptionCode ec = 0;
     for (unsigned i = 0; i < toLengthListSize; ++i) {
         float animatedNumber = animatedLengthList[i].value(lengthContext);
         SVGLengthType unitType = toLengthList[i].unitType();
@@ -123,7 +127,8 @@ void SVGAnimatedLengthListAnimator::calculateAnimatedValue(float percentage, uns
         float effectiveToAtEnd = i < toAtEndOfDurationListSize ? toAtEndOfDurationLengthList[i].value(lengthContext) : 0;
 
         m_animationElement->animateAdditiveNumber(percentage, repeatCount, effectiveFrom, toLengthList[i].value(lengthContext), effectiveToAtEnd, animatedNumber);
-        animatedLengthList[i].setValue(lengthContext, animatedNumber, m_lengthMode, unitType, ASSERT_NO_EXCEPTION);
+        animatedLengthList[i].setValue(lengthContext, animatedNumber, m_lengthMode, unitType, ec);
+        ASSERT(!ec);
     }
 }
 
index e70d86a..bf5bf42 100644 (file)
@@ -27,7 +27,6 @@
 #include "CSSHelper.h"
 #include "CSSPrimitiveValue.h"
 #include "ExceptionCode.h"
-#include "ExceptionCodePlaceholder.h"
 #include "FloatConversion.h"
 #include "SVGNames.h"
 #include "SVGParserUtilities.h"
@@ -133,7 +132,9 @@ SVGLength::SVGLength(const SVGLengthContext& context, float value, SVGLengthMode
     : m_valueInSpecifiedUnits(0)
     , m_unit(storeUnit(mode, unitType))
 {
-    setValue(value, context, ASSERT_NO_EXCEPTION);
+    ExceptionCode ec = 0;
+    setValue(value, context, ec);
+    ASSERT(!ec);
 }
 
 SVGLength::SVGLength(const SVGLength& other)
index cb86f08..3943ffe 100644 (file)
@@ -95,8 +95,11 @@ PassRefPtr<SVGAnimatedProperty> SVGTextContentElement::lookupOrCreateTextLengthW
 PassRefPtr<SVGAnimatedLength> SVGTextContentElement::textLengthAnimated()
 {
     DEFINE_STATIC_LOCAL(SVGLength, defaultTextLength, (LengthModeOther));
-    if (m_specifiedTextLength == defaultTextLength)
-        m_textLength.value.newValueSpecifiedUnits(LengthTypeNumber, getComputedTextLength(), ASSERT_NO_EXCEPTION);
+    if (m_specifiedTextLength == defaultTextLength) {
+        ExceptionCode ec = 0;
+        m_textLength.value.newValueSpecifiedUnits(LengthTypeNumber, getComputedTextLength(), ec);
+        ASSERT(!ec);
+    }
 
     m_textLength.shouldSynchronize = true;
     return static_pointer_cast<SVGAnimatedLength>(lookupOrCreateTextLengthWrapper(this));
index cb8a444..677b7e0 100644 (file)
@@ -202,8 +202,10 @@ static inline QualifiedName constructQualifiedName(const SVGElement* svgElement,
     
     String prefix;
     String localName;
-    if (!Document::parseQualifiedName(attributeName, prefix, localName, ASSERT_NO_EXCEPTION))
+    ExceptionCode ec = 0;
+    if (!Document::parseQualifiedName(attributeName, prefix, localName, ec))
         return anyQName();
+    ASSERT(!ec);
     
     String namespaceURI = svgElement->lookupNamespaceURI(prefix);    
     if (namespaceURI.isEmpty())