Add a new IGNORE_EXCEPTION helper to ignore ExceptionCodes when they are expected...
authormkwst@chromium.org <mkwst@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 14:21:48 +0000 (14:21 +0000)
committermkwst@chromium.org <mkwst@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 14:21:48 +0000 (14:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108771

Reviewed by Eric Seidel.

In cases where the ExceptionCode passed into a function is completely
ignored, this patch replaces it with a new IGNORE_EXCEPTION macro. This
makes our expectations about possible exceptions (or lack thereof)
explicit, rather than relying on implicit assumptions about whether a
variable is intentionally uninitialized or not. It also removes
knowledge about the internals of ExceptionCodes (that they're currently
ints, for instance) from code that shouldn't care, which will help with
future refactorings.

The implementation is entirely based upon ASSERT_NO_EXCEPTION, and
shouldn't have any visible effect on the web. As long as all the
current tests pass, we're good.

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::stop):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processBuffer):
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* dom/ExceptionCodePlaceholder.h:
(WebCore):
* dom/Node.cpp:
(WebCore::Node::normalize):
* dom/Text.cpp:
(WebCore::Text::replaceWholeText):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::insertDictatedText):
* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::doApply):
(WebCore::AppendNodeCommand::doUnapply):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::doUnapply):
* editing/Editor.cpp:
(WebCore::dispatchEditableContentChangedEvents):
(WebCore::Editor::applyEditingStyleToElement):
* editing/EditorCommand.cpp:
(WebCore::executeFormatBlock):
* editing/FormatBlockCommand.cpp:
(WebCore::FormatBlockCommand::elementForFormatBlockCommand):
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::doApply):
(WebCore::InsertIntoTextNodeCommand::doUnapply):
* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApplyForSingleParagraph):
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::doApply):
(WebCore::InsertNodeBeforeCommand::doUnapply):
* editing/RemoveCSSPropertyCommand.cpp:
(WebCore::RemoveCSSPropertyCommand::doApply):
(WebCore::RemoveCSSPropertyCommand::doUnapply):
* editing/RemoveNodeCommand.cpp:
(WebCore::RemoveNodeCommand::doApply):
(WebCore::RemoveNodeCommand::doUnapply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
* editing/TextIterator.cpp:
(WebCore::TextIterator::getLocationAndLengthFromRange):
* editing/WrapContentsInDummySpanCommand.cpp:
(WebCore::WrapContentsInDummySpanCommand::executeApply):
(WebCore::WrapContentsInDummySpanCommand::doUnapply):
* editing/htmlediting.cpp:
(WebCore::comparePositions):
* editing/markup.cpp:
(WebCore::highestAncestorToWrapMarkup):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::appendEntry):
(WebCore::FTPDirectoryDocumentParser::createTDForFilename):
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
(WebCore::FTPDirectoryDocumentParser::createBasicDocument):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rewind):
(WebCore::HTMLMediaElement::returnToRealtime):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::percentLoaded):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
(WebCore::HTMLMediaElement::applyMediaFragmentURI):
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::setTextContentInternal):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::remove):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::createTHead):
(WebCore::HTMLTableElement::deleteTHead):
(WebCore::HTMLTableElement::createTFoot):
(WebCore::HTMLTableElement::deleteTFoot):
(WebCore::HTMLTableElement::createCaption):
(WebCore::HTMLTableElement::deleteCaption):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setDefaultValue):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure):
* html/InputType.cpp:
(WebCore::InputType::stepUpFromRenderer):
* html/MediaController.cpp:
(MediaController::bringElementUpToSpeed):
(MediaController::asyncEventTimerFired):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleKeydownEvent):
* html/TimeRanges.cpp:
(TimeRanges::contain):
(TimeRanges::nearest):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImageFromRect):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::MediaControlSeekButtonElement::seekTimerFired):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::setPosition):
(WebCore::MediaControlPanelElement::resetPosition):
(WebCore::MediaControlStatusDisplayElement::update):
(WebCore::MediaControlRewindButtonElement::defaultEventHandler):
(WebCore::MediaControlTimelineElement::defaultEventHandler):
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::updateCurrentTimeDisplay):
(WebCore::MediaControls::createTextTrackDisplay):
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::updateCurrentTimeDisplay):
* html/shadow/MediaControlsBlackBerry.cpp:
(WebCore::MediaControlEmbeddedPanelElement::setPosition):
(WebCore::MediaControlEmbeddedPanelElement::resetPosition):
(WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
(WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
* html/shadow/MediaControlsChromium.cpp:
(WebCore::MediaControlsChromium::updateCurrentTimeDisplay):
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::addGenericCue):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* inspector/InspectorHistory.cpp:
(WebCore::InspectorHistory::markUndoableState):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
* page/DOMWindow.cpp:
(WebCore::didAddStorageEventListener):
* page/DragController.cpp:
(WebCore::documentFragmentFromDragData):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchDragEvent):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::handleTextInputEvent):
* page/Page.cpp:
(WebCore::Page::findStringMatchingRanges):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaSliderTrack):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::percentLoaded):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::getDataSelection):
(WebCore::documentFragmentWithImageResource):
(WebCore::Pasteboard::documentFragment):
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
(-[WebVideoFullscreenHUDWindowController setVolume:]):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::paintMediaSliderTrack):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::getRanges):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaSliderTrack):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::detachTarget):
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::transformDocumentToTreeView):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::endElementNs):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseEndElement):

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

66 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBRequest.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/ExceptionCodePlaceholder.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Text.cpp
Source/WebCore/editing/AlternativeTextController.cpp
Source/WebCore/editing/AppendNodeCommand.cpp
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/DeleteFromTextNodeCommand.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/editing/FormatBlockCommand.cpp
Source/WebCore/editing/InsertIntoTextNodeCommand.cpp
Source/WebCore/editing/InsertListCommand.cpp
Source/WebCore/editing/InsertNodeBeforeCommand.cpp
Source/WebCore/editing/RemoveCSSPropertyCommand.cpp
Source/WebCore/editing/RemoveNodeCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/WrapContentsInDummySpanCommand.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/markup.cpp
Source/WebCore/html/FTPDirectoryDocument.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLOutputElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLTableElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/html/MediaController.cpp
Source/WebCore/html/MediaDocument.cpp
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/TimeRanges.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/shadow/MediaControlElementTypes.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControls.cpp
Source/WebCore/html/shadow/MediaControlsApple.cpp
Source/WebCore/html/shadow/MediaControlsBlackBerry.cpp
Source/WebCore/html/shadow/MediaControlsChromium.cpp
Source/WebCore/html/track/InbandTextTrack.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorHistory.cpp
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm
Source/WebCore/platform/qt/RenderThemeQt.cpp
Source/WebCore/rendering/RenderNamedFlowThread.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/svg/SVGTRefElement.cpp
Source/WebCore/xml/XMLTreeViewer.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Source/WebCore/xml/parser/XMLDocumentParserQt.cpp

index c77a9d7..180a9e7 100644 (file)
@@ -1,3 +1,192 @@
+2013-02-08  Mike West  <mkwst@chromium.org>
+
+        Add a new IGNORE_EXCEPTION helper to ignore ExceptionCodes when they are expected but uninteresting
+        https://bugs.webkit.org/show_bug.cgi?id=108771
+
+        Reviewed by Eric Seidel.
+
+        In cases where the ExceptionCode passed into a function is completely
+        ignored, this patch replaces it with a new IGNORE_EXCEPTION macro. This
+        makes our expectations about possible exceptions (or lack thereof)
+        explicit, rather than relying on implicit assumptions about whether a
+        variable is intentionally uninitialized or not. It also removes
+        knowledge about the internals of ExceptionCodes (that they're currently
+        ints, for instance) from code that shouldn't care, which will help with
+        future refactorings.
+
+        The implementation is entirely based upon ASSERT_NO_EXCEPTION, and
+        shouldn't have any visible effect on the web. As long as all the
+        current tests pass, we're good.
+
+        * Modules/indexeddb/IDBRequest.cpp:
+        (WebCore::IDBRequest::dispatchEvent):
+        (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::stop):
+        * Modules/websockets/WebSocketChannel.cpp:
+        (WebCore::WebSocketChannel::processBuffer):
+        * dom/Document.cpp:
+        (WebCore::Document::processHttpEquiv):
+        * dom/ExceptionCodePlaceholder.h:
+        (WebCore):
+        * dom/Node.cpp:
+        (WebCore::Node::normalize):
+        * dom/Text.cpp:
+        (WebCore::Text::replaceWholeText):
+        * editing/AlternativeTextController.cpp:
+        (WebCore::AlternativeTextController::insertDictatedText):
+        * editing/AppendNodeCommand.cpp:
+        (WebCore::AppendNodeCommand::doApply):
+        (WebCore::AppendNodeCommand::doUnapply):
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
+        * editing/DeleteFromTextNodeCommand.cpp:
+        (WebCore::DeleteFromTextNodeCommand::doUnapply):
+        * editing/Editor.cpp:
+        (WebCore::dispatchEditableContentChangedEvents):
+        (WebCore::Editor::applyEditingStyleToElement):
+        * editing/EditorCommand.cpp:
+        (WebCore::executeFormatBlock):
+        * editing/FormatBlockCommand.cpp:
+        (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
+        * editing/InsertIntoTextNodeCommand.cpp:
+        (WebCore::InsertIntoTextNodeCommand::doApply):
+        (WebCore::InsertIntoTextNodeCommand::doUnapply):
+        * editing/InsertListCommand.cpp:
+        (WebCore::InsertListCommand::doApplyForSingleParagraph):
+        * editing/InsertNodeBeforeCommand.cpp:
+        (WebCore::InsertNodeBeforeCommand::doApply):
+        (WebCore::InsertNodeBeforeCommand::doUnapply):
+        * editing/RemoveCSSPropertyCommand.cpp:
+        (WebCore::RemoveCSSPropertyCommand::doApply):
+        (WebCore::RemoveCSSPropertyCommand::doUnapply):
+        * editing/RemoveNodeCommand.cpp:
+        (WebCore::RemoveNodeCommand::doApply):
+        (WebCore::RemoveNodeCommand::doUnapply):
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
+        * editing/TextIterator.cpp:
+        (WebCore::TextIterator::getLocationAndLengthFromRange):
+        * editing/WrapContentsInDummySpanCommand.cpp:
+        (WebCore::WrapContentsInDummySpanCommand::executeApply):
+        (WebCore::WrapContentsInDummySpanCommand::doUnapply):
+        * editing/htmlediting.cpp:
+        (WebCore::comparePositions):
+        * editing/markup.cpp:
+        (WebCore::highestAncestorToWrapMarkup):
+        * html/FTPDirectoryDocument.cpp:
+        (WebCore::FTPDirectoryDocumentParser::appendEntry):
+        (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
+        (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
+        (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::rewind):
+        (WebCore::HTMLMediaElement::returnToRealtime):
+        (WebCore::HTMLMediaElement::playInternal):
+        (WebCore::HTMLMediaElement::percentLoaded):
+        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
+        (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
+        (WebCore::HTMLMediaElement::applyMediaFragmentURI):
+        * html/HTMLOutputElement.cpp:
+        (WebCore::HTMLOutputElement::setTextContentInternal):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::remove):
+        * html/HTMLTableElement.cpp:
+        (WebCore::HTMLTableElement::createTHead):
+        (WebCore::HTMLTableElement::deleteTHead):
+        (WebCore::HTMLTableElement::createTFoot):
+        (WebCore::HTMLTableElement::deleteTFoot):
+        (WebCore::HTMLTableElement::createCaption):
+        (WebCore::HTMLTableElement::deleteCaption):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::setDefaultValue):
+        * html/ImageDocument.cpp:
+        (WebCore::ImageDocument::createDocumentStructure):
+        * html/InputType.cpp:
+        (WebCore::InputType::stepUpFromRenderer):
+        * html/MediaController.cpp:
+        (MediaController::bringElementUpToSpeed):
+        (MediaController::asyncEventTimerFired):
+        * html/MediaDocument.cpp:
+        (WebCore::MediaDocumentParser::createDocumentStructure):
+        (WebCore::MediaDocument::replaceMediaElementTimerFired):
+        * html/PluginDocument.cpp:
+        (WebCore::PluginDocumentParser::createDocumentStructure):
+        * html/RangeInputType.cpp:
+        (WebCore::RangeInputType::handleKeydownEvent):
+        * html/TimeRanges.cpp:
+        (TimeRanges::contain):
+        (TimeRanges::nearest):
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::drawImageFromRect):
+        * html/shadow/MediaControlElementTypes.cpp:
+        (WebCore::MediaControlSeekButtonElement::seekTimerFired):
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlPanelElement::setPosition):
+        (WebCore::MediaControlPanelElement::resetPosition):
+        (WebCore::MediaControlStatusDisplayElement::update):
+        (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
+        (WebCore::MediaControlTimelineElement::defaultEventHandler):
+        * html/shadow/MediaControls.cpp:
+        (WebCore::MediaControls::updateCurrentTimeDisplay):
+        (WebCore::MediaControls::createTextTrackDisplay):
+        * html/shadow/MediaControlsApple.cpp:
+        (WebCore::MediaControlsApple::updateCurrentTimeDisplay):
+        * html/shadow/MediaControlsBlackBerry.cpp:
+        (WebCore::MediaControlEmbeddedPanelElement::setPosition):
+        (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
+        (WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
+        (WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
+        * html/shadow/MediaControlsChromium.cpp:
+        (WebCore::MediaControlsChromium::updateCurrentTimeDisplay):
+        * html/track/InbandTextTrack.cpp:
+        (WebCore::InbandTextTrack::addGenericCue):
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
+        * inspector/InspectorHistory.cpp:
+        (WebCore::InspectorHistory::markUndoableState):
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::InspectorResourceAgent::replayXHR):
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::contextMenuItemSelected):
+        * page/DOMWindow.cpp:
+        (WebCore::didAddStorageEventListener):
+        * page/DragController.cpp:
+        (WebCore::documentFragmentFromDragData):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::dispatchDragEvent):
+        (WebCore::EventHandler::keyEvent):
+        (WebCore::EventHandler::handleTextInputEvent):
+        * page/Page.cpp:
+        (WebCore::Page::findStringMatchingRanges):
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::paintMediaSliderTrack):
+        * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
+        (WebCore::MediaPlayerPrivate::percentLoaded):
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::paintMediaSliderTrack):
+        * platform/mac/PasteboardMac.mm:
+        (WebCore::Pasteboard::getDataSelection):
+        (WebCore::documentFragmentWithImageResource):
+        (WebCore::Pasteboard::documentFragment):
+        * platform/mac/WebVideoFullscreenHUDWindowController.mm:
+        (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
+        (-[WebVideoFullscreenHUDWindowController setVolume:]):
+        * platform/qt/RenderThemeQt.cpp:
+        (WebCore::RenderThemeQt::paintMediaSliderTrack):
+        * rendering/RenderNamedFlowThread.cpp:
+        (WebCore::RenderNamedFlowThread::getRanges):
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintMediaSliderTrack):
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefElement::detachTarget):
+        * xml/XMLTreeViewer.cpp:
+        (WebCore::XMLTreeViewer::transformDocumentToTreeView):
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::XMLDocumentParser::endElementNs):
+        * xml/parser/XMLDocumentParserQt.cpp:
+        (WebCore::XMLDocumentParser::parseEndElement):
+
 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Web Inspector: Introduce workspace provider/project type, encapsulate uri creation in SimpleWorkspaceProvider.
index d0ce0fd..ccbfe12 100644 (file)
@@ -35,6 +35,7 @@
 #include "EventListener.h"
 #include "EventNames.h"
 #include "EventQueue.h"
+#include "ExceptionCodePlaceholder.h"
 #include "IDBBindingUtilities.h"
 #include "IDBCursorWithValue.h"
 #include "IDBDatabase.h"
@@ -494,8 +495,7 @@ bool IDBRequest::dispatchEvent(PassRefPtr<Event> event)
         // doesn't receive a second error) and before deactivating (which might trigger commit).
         if (event->type() == eventNames().errorEvent && dontPreventDefault && !m_requestAborted) {
             m_transaction->setError(m_error, m_errorMessage);
-            ExceptionCode unused;
-            m_transaction->abort(unused);
+            m_transaction->abort(IGNORE_EXCEPTION);
         }
 
         // If this was the last request in the transaction's list, it may commit here.
@@ -516,8 +516,7 @@ void IDBRequest::uncaughtExceptionInEventHandler()
 {
     if (m_transaction && !m_requestAborted) {
         m_transaction->setError(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::AbortError)), "Uncaught exception in event handler.");
-        ExceptionCode unused;
-        m_transaction->abort(unused);
+        m_transaction->abort(IGNORE_EXCEPTION);
     }
 }
 
index 02dfe0f..1b9c938 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "EventException.h"
 #include "EventQueue.h"
+#include "ExceptionCodePlaceholder.h"
 #include "IDBDatabase.h"
 #include "IDBDatabaseException.h"
 #include "IDBEventDispatcher.h"
@@ -423,8 +424,7 @@ void IDBTransaction::stop()
     ActiveDOMObject::stop();
     m_contextStopped = true;
 
-    ExceptionCode unused;
-    abort(unused);
+    abort(IGNORE_EXCEPTION);
 }
 
 void IDBTransaction::enqueueEvent(PassRefPtr<Event> event)
index 71d9c52..476c292 100644 (file)
@@ -37,6 +37,7 @@
 #include "Blob.h"
 #include "CookieJar.h"
 #include "Document.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FileError.h"
 #include "FileReaderLoader.h"
 #include "Frame.h"
@@ -426,8 +427,8 @@ bool WebSocketChannel::processBuffer()
                 InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(m_document, m_identifier, m_handshake->serverHandshakeResponse());
             if (!m_handshake->serverSetCookie().isEmpty()) {
                 if (cookiesEnabled(m_document)) {
-                    ExceptionCode ec; // Exception (for sandboxed documents) ignored.
-                    m_document->setCookie(m_handshake->serverSetCookie(), ec);
+                    // Exception (for sandboxed documents) ignored.
+                    m_document->setCookie(m_handshake->serverSetCookie(), IGNORE_EXCEPTION);
                 }
             }
             // FIXME: handle set-cookie2.
index 304c3b0..bf546c3 100644 (file)
@@ -68,6 +68,7 @@
 #include "EventListener.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FlowThreadController.h"
 #include "FocusController.h"
 #include "FormController.h"
@@ -2846,8 +2847,8 @@ void Document::processHttpEquiv(const String& equiv, const String& content)
     } else if (equalIgnoringCase(equiv, "set-cookie")) {
         // FIXME: make setCookie work on XML documents too; e.g. in case of <html:meta .....>
         if (isHTMLDocument()) {
-            ExceptionCode ec; // Exception (for sandboxed documents) ignored.
-            static_cast<HTMLDocument*>(this)->setCookie(content, ec);
+            // Exception (for sandboxed documents) ignored.
+            static_cast<HTMLDocument*>(this)->setCookie(content, IGNORE_EXCEPTION);
         }
     } else if (equalIgnoringCase(equiv, "content-language"))
         setContentLanguage(content);
index cec8b8d..aadd527 100644 (file)
@@ -58,6 +58,8 @@ inline ExceptionCodePlaceholder::ExceptionCodePlaceholder(ExceptionCode code)
 class IgnorableExceptionCode : public ExceptionCodePlaceholder {
 };
 
+#define IGNORE_EXCEPTION ::WebCore::IgnorableExceptionCode()
+
 #if ASSERT_DISABLED
 
 #define ASSERT_NO_EXCEPTION ::WebCore::IgnorableExceptionCode()
index 6458242..6dc16e0 100644 (file)
@@ -59,6 +59,7 @@
 #include "EventListener.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FocusEvent.h"
 #include "Frame.h"
 #include "FrameView.h"
@@ -609,8 +610,7 @@ void Node::normalize()
         if (!text->length()) {
             // Care must be taken to get the next node before removing the current node.
             node = NodeTraversal::nextPostOrder(node.get());
-            ExceptionCode ec;
-            text->remove(ec);
+            text->remove(IGNORE_EXCEPTION);
             continue;
         }
 
@@ -622,17 +622,15 @@ void Node::normalize()
 
             // Remove empty text nodes.
             if (!nextText->length()) {
-                ExceptionCode ec;
-                nextText->remove(ec);
+                nextText->remove(IGNORE_EXCEPTION);
                 continue;
             }
 
             // Both non-empty text nodes. Merge them.
             unsigned offset = text->length();
-            ExceptionCode ec;
-            text->appendData(nextText->data(), ec);
+            text->appendData(nextText->data(), IGNORE_EXCEPTION);
             document()->textNodesMerged(nextText.get(), offset);
-            nextText->remove(ec);
+            nextText->remove(IGNORE_EXCEPTION);
         }
 
         node = NodeTraversal::nextPostOrder(node.get());
index 71f1df2..dbf35a4 100644 (file)
@@ -23,6 +23,7 @@
 #include "Text.h"
 
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "NodeRenderingContext.h"
 #include "RenderCombineText.h"
 #include "RenderText.h"
@@ -156,11 +157,10 @@ PassRefPtr<Text> Text::replaceWholeText(const String& newText, ExceptionCode&)
 
     RefPtr<Text> protectedThis(this); // Mutation event handlers could cause our last ref to go away
     RefPtr<ContainerNode> parent = parentNode(); // Protect against mutation handlers moving this node during traversal
-    ExceptionCode ignored = 0;
     for (RefPtr<Node> n = startText; n && n != this && n->isTextNode() && n->parentNode() == parent;) {
         RefPtr<Node> nodeToRemove(n.release());
         n = nodeToRemove->nextSibling();
-        parent->removeChild(nodeToRemove.get(), ignored);
+        parent->removeChild(nodeToRemove.get(), IGNORE_EXCEPTION);
     }
 
     if (this != endText) {
@@ -168,17 +168,17 @@ PassRefPtr<Text> Text::replaceWholeText(const String& newText, ExceptionCode&)
         for (RefPtr<Node> n = nextSibling(); n && n != onePastEndText && n->isTextNode() && n->parentNode() == parent;) {
             RefPtr<Node> nodeToRemove(n.release());
             n = nodeToRemove->nextSibling();
-            parent->removeChild(nodeToRemove.get(), ignored);
+            parent->removeChild(nodeToRemove.get(), IGNORE_EXCEPTION);
         }
     }
 
     if (newText.isEmpty()) {
         if (parent && parentNode() == parent)
-            parent->removeChild(this, ignored);
+            parent->removeChild(this, IGNORE_EXCEPTION);
         return 0;
     }
 
-    setData(newText, ignored);
+    setData(newText, IGNORE_EXCEPTION);
     return protectedThis.release();
 }
 
index 5640ae3..be0ecb7 100644 (file)
@@ -33,6 +33,7 @@
 #include "EditCommand.h"
 #include "EditorClient.h"
 #include "Event.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FloatQuad.h"
 #include "Frame.h"
 #include "FrameView.h"
@@ -707,8 +708,7 @@ bool AlternativeTextController::insertDictatedText(const String& text, const Vec
     RefPtr<TextEvent> event = TextEvent::createForDictation(m_frame->document()->domWindow(), text, dictationAlternatives);
     event->setUnderlyingEvent(triggeringEvent);
 
-    ExceptionCode ec;
-    target->dispatchEvent(event, ec);
+    target->dispatchEvent(event, IGNORE_EXCEPTION);
     return event->defaultHandled();
 }
 
index 4ccac7a..5f20f4e 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "AXObjectCache.h"
 #include "Document.h"
+#include "ExceptionCodePlaceholder.h"
 #include "htmlediting.h"
 
 namespace WebCore {
@@ -58,9 +59,8 @@ void AppendNodeCommand::doApply()
 {
     if (!m_parent->rendererIsEditable() && m_parent->attached())
         return;
-        
-    ExceptionCode ec;
-    m_parent->appendChild(m_node.get(), ec, true /* lazyAttach */);
+
+    m_parent->appendChild(m_node.get(), IGNORE_EXCEPTION, true /* lazyAttach */);
 
     if (AXObjectCache::accessibilityEnabled())
         sendAXTextChangedIgnoringLineBreaks(m_node.get(), AXObjectCache::AXTextInserted);
@@ -75,8 +75,7 @@ void AppendNodeCommand::doUnapply()
     if (AXObjectCache::accessibilityEnabled())
         sendAXTextChangedIgnoringLineBreaks(m_node.get(), AXObjectCache::AXTextDeleted);
 
-    ExceptionCode ec;
-    m_node->remove(ec);
+    m_node->remove(IGNORE_EXCEPTION);
 }
 
 #ifndef NDEBUG
index a199545..1e9c604 100644 (file)
@@ -35,6 +35,7 @@
 #include "DocumentFragment.h"
 #include "DocumentMarkerController.h"
 #include "EditorInsertAction.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "HTMLElement.h"
 #include "HTMLNames.h"
@@ -895,8 +896,7 @@ void CompositeEditCommand::removePlaceholderAt(const Position& p)
 PassRefPtr<Node> CompositeEditCommand::insertNewDefaultParagraphElementAt(const Position& position)
 {
     RefPtr<Element> paragraphElement = createDefaultParagraphElement(document());
-    ExceptionCode ec;
-    paragraphElement->appendChild(createBreakElement(document()), ec);
+    paragraphElement->appendChild(createBreakElement(document()), IGNORE_EXCEPTION);
     insertNodeAt(paragraphElement, position);
     return paragraphElement.release();
 }
index 25444ac..33aeb1c 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "DeleteFromTextNodeCommand.h"
 #include "Document.h"
+#include "ExceptionCodePlaceholder.h"
 
 #include "AXObjectCache.h"
 #include "Text.h"
@@ -68,9 +69,8 @@ void DeleteFromTextNodeCommand::doUnapply()
 
     if (!m_node->rendererIsEditable())
         return;
-        
-    ExceptionCode ec;
-    m_node->insertData(m_offset, m_text, ec);
+
+    m_node->insertData(m_offset, m_text, IGNORE_EXCEPTION);
 
     if (AXObjectCache::accessibilityEnabled())
         document()->axObjectCache()->nodeTextChangeNotification(m_node.get(), AXObjectCache::AXTextInserted, m_offset, m_text);
index c21f454..bd145b6 100644 (file)
@@ -46,6 +46,7 @@
 #include "EditorClient.h"
 #include "EventHandler.h"
 #include "EventNames.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FocusController.h"
 #include "Frame.h"
 #include "FrameTree.h"
@@ -769,11 +770,10 @@ void Editor::outdent()
 
 static void dispatchEditableContentChangedEvents(Element* startRoot, Element* endRoot)
 {
-    ExceptionCode ec;
     if (startRoot)
-        startRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentChangedEvent, false, false), ec);
+        startRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentChangedEvent, false, false), IGNORE_EXCEPTION);
     if (endRoot && endRoot != startRoot)
-        endRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentChangedEvent, false, false), ec);
+        endRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentChangedEvent, false, false), IGNORE_EXCEPTION);
 }
 
 void Editor::appliedEditing(PassRefPtr<CompositeEditCommand> cmd)
@@ -2680,10 +2680,9 @@ void Editor::applyEditingStyleToElement(Element* element) const
 
     // Mutate using the CSSOM wrapper so we get the same event behavior as a script.
     CSSStyleDeclaration* style = static_cast<StyledElement*>(element)->style();
-    ExceptionCode ec;
-    style->setPropertyInternal(CSSPropertyWordWrap, "break-word", false, ec);
-    style->setPropertyInternal(CSSPropertyWebkitNbspMode, "space", false, ec);
-    style->setPropertyInternal(CSSPropertyWebkitLineBreak, "after-white-space", false, ec);
+    style->setPropertyInternal(CSSPropertyWordWrap, "break-word", false, IGNORE_EXCEPTION);
+    style->setPropertyInternal(CSSPropertyWebkitNbspMode, "space", false, IGNORE_EXCEPTION);
+    style->setPropertyInternal(CSSPropertyWebkitLineBreak, "after-white-space", false, IGNORE_EXCEPTION);
 }
 
 // Searches from the beginning of the document if nothing is selected.
index 256a5b3..676943f 100644 (file)
@@ -38,6 +38,7 @@
 #include "EditorClient.h"
 #include "Event.h"
 #include "EventHandler.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FormatBlockCommand.h"
 #include "Frame.h"
 #include "FrameView.h"
@@ -442,9 +443,8 @@ static bool executeFormatBlock(Frame* frame, Event*, EditorCommandSource, const
     if (tagName[0] == '<' && tagName[tagName.length() - 1] == '>')
         tagName = tagName.substring(1, tagName.length() - 2);
 
-    ExceptionCode ec;
     String localName, prefix;
-    if (!Document::parseQualifiedName(tagName, prefix, localName, ec))
+    if (!Document::parseQualifiedName(tagName, prefix, localName, IGNORE_EXCEPTION))
         return false;
     QualifiedName qualifiedTagName(prefix, localName, xhtmlNamespaceURI);
 
index 7c912d1..f88c5c6 100644 (file)
@@ -27,6 +27,7 @@
 #include "Element.h"
 #include "FormatBlockCommand.h"
 #include "Document.h"
+#include "ExceptionCodePlaceholder.h"
 #include "htmlediting.h"
 #include "HTMLElement.h"
 #include "HTMLNames.h"
@@ -100,8 +101,7 @@ Element* FormatBlockCommand::elementForFormatBlockCommand(Range* range)
     if (!range)
         return 0;
 
-    ExceptionCode ec;
-    Node* commonAncestor = range->commonAncestorContainer(ec);
+    Node* commonAncestor = range->commonAncestorContainer(IGNORE_EXCEPTION);
     while (commonAncestor && !isElementForFormatBlock(commonAncestor))
         commonAncestor = commonAncestor->parentNode();
 
index 3adaa06..9d8867b 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "AXObjectCache.h"
 #include "Document.h"
+#include "ExceptionCodePlaceholder.h"
 #include "RenderText.h"
 #include "Settings.h"
 #include "Text.h"
@@ -60,8 +61,7 @@ void InsertIntoTextNodeCommand::doApply()
             renderText->momentarilyRevealLastTypedCharacter(m_offset + m_text.length() - 1);
     }
 
-    ExceptionCode ec;
-    m_node->insertData(m_offset, m_text, ec);
+    m_node->insertData(m_offset, m_text, IGNORE_EXCEPTION);
 
     if (AXObjectCache::accessibilityEnabled())
         document()->axObjectCache()->nodeTextChangeNotification(m_node.get(), AXObjectCache::AXTextInserted, m_offset, m_text);
@@ -76,8 +76,7 @@ void InsertIntoTextNodeCommand::doUnapply()
     if (AXObjectCache::accessibilityEnabled())
         document()->axObjectCache()->nodeTextChangeNotification(m_node.get(), AXObjectCache::AXTextDeleted, m_offset, m_text);
 
-    ExceptionCode ec;
-    m_node->deleteData(m_offset, m_text.length(), ec);
+    m_node->deleteData(m_offset, m_text.length(), IGNORE_EXCEPTION);
 }
 
 #ifndef NDEBUG
index 7082e8c..0b478a8 100644 (file)
@@ -27,6 +27,7 @@
 #include "Element.h"
 #include "InsertListCommand.h"
 #include "DocumentFragment.h"
+#include "ExceptionCodePlaceholder.h"
 #include "htmlediting.h"
 #include "HTMLElement.h"
 #include "HTMLNames.h"
@@ -232,11 +233,10 @@ void InsertListCommand::doApplyForSingleParagraph(bool forceCreateList, const Qu
 
             // Restore the start and the end of current selection if they started inside listNode
             // because moveParagraphWithClones could have removed them.
-            ExceptionCode ec;
             if (rangeStartIsInList && newList)
-                currentSelection->setStart(newList, 0, ec);
+                currentSelection->setStart(newList, 0, IGNORE_EXCEPTION);
             if (rangeEndIsInList && newList)
-                currentSelection->setEnd(newList, lastOffsetInNode(newList.get()), ec);
+                currentSelection->setEnd(newList, lastOffsetInNode(newList.get()), IGNORE_EXCEPTION);
 
             setEndingSelection(VisiblePosition(firstPositionInNode(newList.get())));
 
index f8681ff..76cfa54 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "AXObjectCache.h"
 #include "Document.h"
+#include "ExceptionCodePlaceholder.h"
 #include "htmlediting.h"
 
 namespace WebCore {
@@ -54,8 +55,7 @@ void InsertNodeBeforeCommand::doApply()
         return;
     ASSERT(parent->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable));
 
-    ExceptionCode ec;
-    parent->insertBefore(m_insertChild.get(), m_refChild.get(), ec, true /* lazyAttach */);
+    parent->insertBefore(m_insertChild.get(), m_refChild.get(), IGNORE_EXCEPTION, true /* lazyAttach */);
 
     if (AXObjectCache::accessibilityEnabled())
         document()->axObjectCache()->nodeTextChangeNotification(m_insertChild.get(), AXObjectCache::AXTextInserted, 0, m_insertChild->nodeValue());
@@ -70,8 +70,7 @@ void InsertNodeBeforeCommand::doUnapply()
     if (AXObjectCache::accessibilityEnabled())
         document()->axObjectCache()->nodeTextChangeNotification(m_insertChild.get(), AXObjectCache::AXTextDeleted, 0, m_insertChild->nodeValue());
 
-    ExceptionCode ec;
-    m_insertChild->remove(ec);
+    m_insertChild->remove(IGNORE_EXCEPTION);
 }
 
 #ifndef NDEBUG
index 58ca6db..f532526 100644 (file)
@@ -27,6 +27,7 @@
 #include "RemoveCSSPropertyCommand.h"
 
 #include "CSSStyleDeclaration.h"
+#include "ExceptionCodePlaceholder.h"
 #include "StylePropertySet.h"
 #include <wtf/Assertions.h>
 
@@ -48,15 +49,13 @@ void RemoveCSSPropertyCommand::doApply()
     m_important = style->propertyIsImportant(m_property);
 
     // Mutate using the CSSOM wrapper so we get the same event behavior as a script.
-    ExceptionCode ec;
     // Setting to null string removes the property. We don't have internal version of removeProperty.
-    m_element->style()->setPropertyInternal(m_property, String(), false, ec);
+    m_element->style()->setPropertyInternal(m_property, String(), false, IGNORE_EXCEPTION);
 }
 
 void RemoveCSSPropertyCommand::doUnapply()
 {
-    ExceptionCode ec;
-    m_element->style()->setPropertyInternal(m_property, m_oldValue, m_important, ec);
+    m_element->style()->setPropertyInternal(m_property, m_oldValue, m_important, IGNORE_EXCEPTION);
 }
 
 #ifndef NDEBUG
index 2313d0e..0e1d305 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "RemoveNodeCommand.h"
 
+#include "ExceptionCodePlaceholder.h"
 #include "Node.h"
 #include <wtf/Assertions.h>
 
@@ -51,8 +52,7 @@ void RemoveNodeCommand::doApply()
     m_parent = parent;
     m_refChild = m_node->nextSibling();
 
-    ExceptionCode ec;
-    m_node->remove(ec);
+    m_node->remove(IGNORE_EXCEPTION);
 }
 
 void RemoveNodeCommand::doUnapply()
@@ -62,8 +62,7 @@ void RemoveNodeCommand::doUnapply()
     if (!parent || !parent->rendererIsEditable())
         return;
 
-    ExceptionCode ec;
-    parent->insertBefore(m_node.get(), refChild.get(), ec);
+    parent->insertBefore(m_node.get(), refChild.get(), IGNORE_EXCEPTION);
 }
 
 #ifndef NDEBUG
index a94eb10..0750964 100644 (file)
@@ -37,6 +37,7 @@
 #include "DocumentFragment.h"
 #include "Element.h"
 #include "EventNames.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameSelection.h"
 #include "HTMLElement.h"
@@ -522,13 +523,12 @@ void ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(Insert
             // FIXME: Hyatt is concerned that selectively using display:inline will give inconsistent
             // results. We already know one issue because td elements ignore their display property
             // in quirks mode (which Mail.app is always in). We should look for an alternative.
-            
+
             // Mutate using the CSSOM wrapper so we get the same event behavior as a script.
-            ExceptionCode ec;
             if (isBlock(element))
-                element->style()->setPropertyInternal(CSSPropertyDisplay, "inline", false, ec);
+                element->style()->setPropertyInternal(CSSPropertyDisplay, "inline", false, IGNORE_EXCEPTION);
             if (element->renderer() && element->renderer()->style()->isFloating())
-                element->style()->setPropertyInternal(CSSPropertyFloat, "none", false, ec);
+                element->style()->setPropertyInternal(CSSPropertyFloat, "none", false, IGNORE_EXCEPTION);
         }
     }
 }
index e2b1e2e..5c88b20 100644 (file)
@@ -28,6 +28,7 @@
 #include "TextIterator.h"
 
 #include "Document.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Font.h"
 #include "Frame.h"
 #include "HTMLElement.h"
@@ -2532,9 +2533,8 @@ bool TextIterator::getLocationAndLengthFromRange(Node* scope, const Range* range
     RefPtr<Range> testRange = Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset());
     ASSERT(testRange->startContainer() == scope);
     location = TextIterator::rangeLength(testRange.get());
-    
-    ExceptionCode ec;
-    testRange->setEnd(range->endContainer(), range->endOffset(), ec);
+
+    testRange->setEnd(range->endContainer(), range->endOffset(), IGNORE_EXCEPTION);
     ASSERT(testRange->startContainer() == scope);
     length = TextIterator::rangeLength(testRange.get()) - location;
     return true;
index dce481c..7a03b64 100644 (file)
@@ -27,6 +27,7 @@
 #include "WrapContentsInDummySpanCommand.h"
 
 #include "ApplyStyleCommand.h"
+#include "ExceptionCodePlaceholder.h"
 #include "HTMLElement.h"
 
 namespace WebCore {
@@ -43,14 +44,12 @@ void WrapContentsInDummySpanCommand::executeApply()
     Vector<RefPtr<Node> > children;
     for (Node* child = m_element->firstChild(); child; child = child->nextSibling())
         children.append(child);
-    
-    ExceptionCode ec;
-    
+
     size_t size = children.size();
     for (size_t i = 0; i < size; ++i)
-        m_dummySpan->appendChild(children[i].release(), ec);
-    
-    m_element->appendChild(m_dummySpan.get(), ec);
+        m_dummySpan->appendChild(children[i].release(), IGNORE_EXCEPTION);
+
+    m_element->appendChild(m_dummySpan.get(), IGNORE_EXCEPTION);
 }
 
 void WrapContentsInDummySpanCommand::doApply()
@@ -71,13 +70,11 @@ void WrapContentsInDummySpanCommand::doUnapply()
     for (Node* child = m_dummySpan->firstChild(); child; child = child->nextSibling())
         children.append(child);
 
-    ExceptionCode ec;
-
     size_t size = children.size();
     for (size_t i = 0; i < size; ++i)
-        m_element->appendChild(children[i].release(), ec);
+        m_element->appendChild(children[i].release(), IGNORE_EXCEPTION);
 
-    m_dummySpan->remove(ec);
+    m_dummySpan->remove(IGNORE_EXCEPTION);
 }
 
 void WrapContentsInDummySpanCommand::doReapply()
index 19fb3f2..684766e 100644 (file)
@@ -29,6 +29,7 @@
 #include "AXObjectCache.h"
 #include "Document.h"
 #include "Editor.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "HTMLBRElement.h"
 #include "HTMLDivElement.h"
@@ -96,8 +97,7 @@ int comparePositions(const Position& a, const Position& b)
             bias = 1;
     }
 
-    ExceptionCode ec;
-    int result = Range::compareBoundaryPoints(nodeA, offsetA, nodeB, offsetB, ec);
+    int result = Range::compareBoundaryPoints(nodeA, offsetA, nodeB, offsetB, IGNORE_EXCEPTION);
     return result ? result : bias;
 }
 
index 3d32a54..f45d089 100644 (file)
@@ -44,6 +44,7 @@
 #include "DocumentType.h"
 #include "Editor.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "HTMLBodyElement.h"
 #include "HTMLElement.h"
@@ -504,8 +505,7 @@ static bool isElementPresentational(const Node* node)
 
 static Node* highestAncestorToWrapMarkup(const Range* range, EAnnotateForInterchange shouldAnnotate)
 {
-    ExceptionCode ec;
-    Node* commonAncestor = range->commonAncestorContainer(ec);
+    Node* commonAncestor = range->commonAncestorContainer(IGNORE_EXCEPTION);
     ASSERT(commonAncestor);
     Node* specialCommonAncestor = 0;
     if (shouldAnnotate == AnnotateForInterchange) {
index c1a0150..c17622a 100644 (file)
@@ -26,6 +26,7 @@
 #if ENABLE(FTPDIR)
 #include "FTPDirectoryDocument.h"
 
+#include "ExceptionCodePlaceholder.h"
 #include "HTMLDocumentParser.h"
 #include "HTMLNames.h"
 #include "HTMLTableElement.h"
@@ -109,38 +110,34 @@ FTPDirectoryDocumentParser::FTPDirectoryDocumentParser(HTMLDocument* document)
 
 void FTPDirectoryDocumentParser::appendEntry(const String& filename, const String& size, const String& date, bool isDirectory)
 {
-    ExceptionCode ec;
-
-    RefPtr<Element> rowElement = m_tableElement->insertRow(-1, ec);
-    rowElement->setAttribute("class", "ftpDirectoryEntryRow", ec);
+    RefPtr<Element> rowElement = m_tableElement->insertRow(-1, IGNORE_EXCEPTION);
+    rowElement->setAttribute("class", "ftpDirectoryEntryRow", IGNORE_EXCEPTION);
 
     RefPtr<Element> element = document()->createElement(tdTag, false);
-    element->appendChild(Text::create(document(), String(&noBreakSpace, 1)), ec);
+    element->appendChild(Text::create(document(), String(&noBreakSpace, 1)), IGNORE_EXCEPTION);
     if (isDirectory)
-        element->setAttribute("class", "ftpDirectoryIcon ftpDirectoryTypeDirectory", ec);
+        element->setAttribute("class", "ftpDirectoryIcon ftpDirectoryTypeDirectory", IGNORE_EXCEPTION);
     else
-        element->setAttribute("class", "ftpDirectoryIcon ftpDirectoryTypeFile", ec);
-    rowElement->appendChild(element, ec);
+        element->setAttribute("class", "ftpDirectoryIcon ftpDirectoryTypeFile", IGNORE_EXCEPTION);
+    rowElement->appendChild(element, IGNORE_EXCEPTION);
 
     element = createTDForFilename(filename);
-    element->setAttribute("class", "ftpDirectoryFileName", ec);
-    rowElement->appendChild(element, ec);
+    element->setAttribute("class", "ftpDirectoryFileName", IGNORE_EXCEPTION);
+    rowElement->appendChild(element, IGNORE_EXCEPTION);
 
     element = document()->createElement(tdTag, false);
-    element->appendChild(Text::create(document(), date), ec);
-    element->setAttribute("class", "ftpDirectoryFileDate", ec);
-    rowElement->appendChild(element, ec);
+    element->appendChild(Text::create(document(), date), IGNORE_EXCEPTION);
+    element->setAttribute("class", "ftpDirectoryFileDate", IGNORE_EXCEPTION);
+    rowElement->appendChild(element, IGNORE_EXCEPTION);
 
     element = document()->createElement(tdTag, false);
-    element->appendChild(Text::create(document(), size), ec);
-    element->setAttribute("class", "ftpDirectoryFileSize", ec);
-    rowElement->appendChild(element, ec);
+    element->appendChild(Text::create(document(), size), IGNORE_EXCEPTION);
+    element->setAttribute("class", "ftpDirectoryFileSize", IGNORE_EXCEPTION);
+    rowElement->appendChild(element, IGNORE_EXCEPTION);
 }
 
 PassRefPtr<Element> FTPDirectoryDocumentParser::createTDForFilename(const String& filename)
 {
-    ExceptionCode ec;
-
     String fullURL = document()->baseURL().string();
     if (fullURL[fullURL.length() - 1] == '/')
         fullURL.append(filename);
@@ -148,11 +145,11 @@ PassRefPtr<Element> FTPDirectoryDocumentParser::createTDForFilename(const String
         fullURL.append("/" + filename);
 
     RefPtr<Element> anchorElement = document()->createElement(aTag, false);
-    anchorElement->setAttribute("href", fullURL, ec);
-    anchorElement->appendChild(Text::create(document(), filename), ec);
+    anchorElement->setAttribute("href", fullURL, IGNORE_EXCEPTION);
+    anchorElement->appendChild(Text::create(document(), filename), IGNORE_EXCEPTION);
 
     RefPtr<Element> tdElement = document()->createElement(tdTag, false);
-    tdElement->appendChild(anchorElement, ec);
+    tdElement->appendChild(anchorElement, IGNORE_EXCEPTION);
 
     return tdElement.release();
 }
@@ -319,16 +316,15 @@ bool FTPDirectoryDocumentParser::loadDocumentTemplate()
     // Otherwise create one manually
     tableElement = document()->createElement(tableTag, false);
     m_tableElement = static_cast<HTMLTableElement*>(tableElement.get());
-    ExceptionCode ec;        
-    m_tableElement->setAttribute("id", "ftpDirectoryTable", ec);
+    m_tableElement->setAttribute("id", "ftpDirectoryTable", IGNORE_EXCEPTION);
 
     // If we didn't find the table element, lets try to append our own to the body
     // If that fails for some reason, cram it on the end of the document as a last
     // ditch effort
     if (Element* body = document()->body())
-        body->appendChild(m_tableElement, ec);
+        body->appendChild(m_tableElement, IGNORE_EXCEPTION);
     else
-        document()->appendChild(m_tableElement, ec);
+        document()->appendChild(m_tableElement, IGNORE_EXCEPTION);
 
     return true;
 }
@@ -341,14 +337,13 @@ void FTPDirectoryDocumentParser::createBasicDocument()
 
     RefPtr<Element> bodyElement = document()->createElement(bodyTag, false);
 
-    ExceptionCode ec;
-    document()->appendChild(bodyElement, ec);
+    document()->appendChild(bodyElement, IGNORE_EXCEPTION);
 
     RefPtr<Element> tableElement = document()->createElement(tableTag, false);
     m_tableElement = static_cast<HTMLTableElement*>(tableElement.get());
-    m_tableElement->setAttribute("id", "ftpDirectoryTable", ec);
+    m_tableElement->setAttribute("id", "ftpDirectoryTable", IGNORE_EXCEPTION);
 
-    bodyElement->appendChild(m_tableElement, ec);
+    bodyElement->appendChild(m_tableElement, IGNORE_EXCEPTION);
 }
 
 void FTPDirectoryDocumentParser::append(const SegmentedString& source)
index 8399f2c..30afd36 100644 (file)
@@ -44,6 +44,7 @@
 #include "Event.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "FrameLoaderClient.h"
@@ -1992,17 +1993,14 @@ void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>*)
 void HTMLMediaElement::rewind(float timeDelta)
 {
     LOG(Media, "HTMLMediaElement::rewind(%f)", timeDelta);
-
-    ExceptionCode e;
-    setCurrentTime(max(currentTime() - timeDelta, minTimeSeekable()), e);
+    setCurrentTime(max(currentTime() - timeDelta, minTimeSeekable()), IGNORE_EXCEPTION);
 }
 
 void HTMLMediaElement::returnToRealtime()
 {
     LOG(Media, "HTMLMediaElement::returnToRealtime");
-    ExceptionCode e;
-    setCurrentTime(maxTimeSeekable(), e);
-}  
+    setCurrentTime(maxTimeSeekable(), IGNORE_EXCEPTION);
+}
 
 void HTMLMediaElement::addPlayedRange(float start, float end)
 {
@@ -2406,10 +2404,8 @@ void HTMLMediaElement::playInternal()
     if (!m_player || m_networkState == NETWORK_EMPTY)
         scheduleLoad(MediaResource);
 
-    if (endedPlayback()) {
-        ExceptionCode unused;
-        seek(0, unused);
-    }
+    if (endedPlayback())
+        seek(0, IGNORE_EXCEPTION);
 
     if (m_mediaController)
         m_mediaController->bringElementUpToSpeed(this);
@@ -2752,9 +2748,8 @@ float HTMLMediaElement::percentLoaded() const
     float buffered = 0;
     RefPtr<TimeRanges> timeRanges = m_player->buffered();
     for (unsigned i = 0; i < timeRanges->length(); ++i) {
-        ExceptionCode ignoredException;
-        float start = timeRanges->start(i, ignoredException);
-        float end = timeRanges->end(i, ignoredException);
+        float start = timeRanges->start(i, IGNORE_EXCEPTION);
+        float end = timeRanges->end(i, IGNORE_EXCEPTION);
         buffered += end - start;
     }
     return buffered / duration;
@@ -3358,10 +3353,9 @@ void HTMLMediaElement::mediaPlayerTimeChanged(MediaPlayer*)
     if (!isnan(dur) && dur && now >= dur && m_playbackRate > 0) {
         // If the media element has a loop attribute specified and does not have a current media controller,
         if (loop() && !m_mediaController) {
-            ExceptionCode ignoredException;
             m_sentEndEvent = false;
             //  then seek to the earliest possible position of the media resource and abort these steps.
-            seek(startTime(), ignoredException);
+            seek(startTime(), IGNORE_EXCEPTION);
         } else {
             // If the media element does not have a current media controller, and the media element
             // has still ended playback, and the direction of playback is still forwards, and paused
@@ -3425,9 +3419,8 @@ void HTMLMediaElement::mediaPlayerDurationChanged(MediaPlayer* player)
 
     float now = currentTime();
     float dur = duration();
-    ExceptionCode ignoredException;
     if (now > dur)
-        seek(dur, ignoredException);
+        seek(dur, IGNORE_EXCEPTION);
 
     endProcessingMediaPlayerCallback();
 }
@@ -4611,9 +4604,8 @@ void HTMLMediaElement::prepareMediaFragmentURI()
 void HTMLMediaElement::applyMediaFragmentURI()
 {
     if (m_fragmentStartTime != MediaPlayer::invalidTime()) {
-        ExceptionCode ignoredException;
         m_sentEndEvent = false;
-        seek(m_fragmentStartTime, ignoredException);
+        seek(m_fragmentStartTime, IGNORE_EXCEPTION);
     }
 }
 
index a83902a..1ac1109 100644 (file)
@@ -31,6 +31,7 @@
 #include "config.h"
 #include "HTMLOutputElement.h"
 
+#include "ExceptionCodePlaceholder.h"
 #include "HTMLFormElement.h"
 #include "HTMLNames.h"
 
@@ -136,9 +137,8 @@ void HTMLOutputElement::setDefaultValue(const String& value)
 void HTMLOutputElement::setTextContentInternal(const String& value)
 {
     ASSERT(!m_isSetTextContentInProgress);
-    ExceptionCode ec;
     m_isSetTextContentInProgress = true;
-    setTextContent(value, ec);
+    setTextContent(value, IGNORE_EXCEPTION);
 }
 
 } // namespace
index 2cb7af2..5955cbf 100644 (file)
@@ -33,6 +33,7 @@
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "EventNames.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FormController.h"
 #include "FormDataList.h"
 #include "Frame.h"
@@ -224,8 +225,7 @@ void HTMLSelectElement::remove(int optionIndex)
     if (listIndex < 0)
         return;
 
-    ExceptionCode ec;
-    listItems()[listIndex]->remove(ec);
+    listItems()[listIndex]->remove(IGNORE_EXCEPTION);
 }
 
 void HTMLSelectElement::remove(HTMLOptionElement* option)
@@ -233,8 +233,7 @@ void HTMLSelectElement::remove(HTMLOptionElement* option)
     if (option->ownerSelectElement() != this)
         return;
 
-    ExceptionCode ec;
-    option->remove(ec);
+    option->remove(IGNORE_EXCEPTION);
 }
 
 String HTMLSelectElement::value() const
index 59f0b0c..d0eb12d 100644 (file)
@@ -32,6 +32,7 @@
 #include "CSSValueKeywords.h"
 #include "CSSValuePool.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "HTMLNames.h"
 #include "HTMLParserIdioms.h"
 #include "HTMLTableCaptionElement.h"
@@ -128,15 +129,13 @@ PassRefPtr<HTMLElement> HTMLTableElement::createTHead()
     if (HTMLTableSectionElement* existingHead = tHead())
         return existingHead;
     RefPtr<HTMLTableSectionElement> head = HTMLTableSectionElement::create(theadTag, document());
-    ExceptionCode ec;
-    setTHead(head, ec);
+    setTHead(head, IGNORE_EXCEPTION);
     return head.release();
 }
 
 void HTMLTableElement::deleteTHead()
 {
-    ExceptionCode ec;
-    removeChild(tHead(), ec);
+    removeChild(tHead(), IGNORE_EXCEPTION);
 }
 
 PassRefPtr<HTMLElement> HTMLTableElement::createTFoot()
@@ -144,15 +143,13 @@ PassRefPtr<HTMLElement> HTMLTableElement::createTFoot()
     if (HTMLTableSectionElement* existingFoot = tFoot())
         return existingFoot;
     RefPtr<HTMLTableSectionElement> foot = HTMLTableSectionElement::create(tfootTag, document());
-    ExceptionCode ec;
-    setTFoot(foot, ec);
+    setTFoot(foot, IGNORE_EXCEPTION);
     return foot.release();
 }
 
 void HTMLTableElement::deleteTFoot()
 {
-    ExceptionCode ec;
-    removeChild(tFoot(), ec);
+    removeChild(tFoot(), IGNORE_EXCEPTION);
 }
 
 PassRefPtr<HTMLElement> HTMLTableElement::createTBody()
@@ -168,15 +165,13 @@ PassRefPtr<HTMLElement> HTMLTableElement::createCaption()
     if (HTMLTableCaptionElement* existingCaption = caption())
         return existingCaption;
     RefPtr<HTMLTableCaptionElement> caption = HTMLTableCaptionElement::create(captionTag, document());
-    ExceptionCode ec;
-    setCaption(caption, ec);
+    setCaption(caption, IGNORE_EXCEPTION);
     return caption.release();
 }
 
 void HTMLTableElement::deleteCaption()
 {
-    ExceptionCode ec;
-    removeChild(caption(), ec);
+    removeChild(caption(), IGNORE_EXCEPTION);
 }
 
 HTMLTableSectionElement* HTMLTableElement::lastBody() const
index bfff4bf..adf4d5a 100644 (file)
@@ -34,6 +34,7 @@
 #include "Event.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FormController.h"
 #include "FormDataList.h"
 #include "Frame.h"
@@ -417,17 +418,16 @@ void HTMLTextAreaElement::setDefaultValue(const String& defaultValue)
         if (n->isTextNode())
             textNodes.append(n);
     }
-    ExceptionCode ec;
     size_t size = textNodes.size();
     for (size_t i = 0; i < size; ++i)
-        removeChild(textNodes[i].get(), ec);
+        removeChild(textNodes[i].get(), IGNORE_EXCEPTION);
 
     // Normalize line endings.
     String value = defaultValue;
     value.replace("\r\n", "\n");
     value.replace('\r', '\n');
 
-    insertBefore(document()->createTextNode(value), firstChild(), ec);
+    insertBefore(document()->createTextNode(value), firstChild(), IGNORE_EXCEPTION);
 
     if (!m_isDirty)
         setNonDirtyValue(value);
index 51a0304..c6352fc 100644 (file)
@@ -29,6 +29,7 @@
 #include "DocumentLoader.h"
 #include "EventListener.h"
 #include "EventNames.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
 #include "FrameView.h"
@@ -192,10 +193,8 @@ PassRefPtr<DocumentParser> ImageDocument::createParser()
 
 void ImageDocument::createDocumentStructure()
 {
-    ExceptionCode ec;
-    
     RefPtr<Element> rootElement = Document::createElement(htmlTag, false);
-    appendChild(rootElement, ec);
+    appendChild(rootElement, IGNORE_EXCEPTION);
     static_cast<HTMLHtmlElement*>(rootElement.get())->insertedByParser();
 
     if (frame() && frame()->loader())
@@ -204,7 +203,7 @@ void ImageDocument::createDocumentStructure()
     RefPtr<Element> body = Document::createElement(bodyTag, false);
     body->setAttribute(styleAttr, "margin: 0px;");
     
-    rootElement->appendChild(body, ec);
+    rootElement->appendChild(body, IGNORE_EXCEPTION);
     
     RefPtr<ImageDocumentElement> imageElement = ImageDocumentElement::create(this);
     
@@ -212,7 +211,7 @@ void ImageDocument::createDocumentStructure()
     imageElement->setLoadManually(true);
     imageElement->setSrc(url().string());
     
-    body->appendChild(imageElement, ec);
+    body->appendChild(imageElement, IGNORE_EXCEPTION);
     
     if (shouldShrinkToFit()) {
         // Add event listeners
index 64d231f..e0b2940 100644 (file)
@@ -40,6 +40,7 @@
 #include "ElementShadow.h"
 #include "EmailInputType.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FileInputType.h"
 #include "FileList.h"
 #include "FormController.h"
@@ -1095,20 +1096,17 @@ void InputType::stepUpFromRenderer(int n)
     String currentStringValue = element()->value();
     Decimal current = parseToNumberOrNaN(currentStringValue);
     if (!current.isFinite()) {
-        ExceptionCode ec;
         current = defaultValueForStepUp();
         const Decimal nextDiff = step * n;
         if (current < stepRange.minimum() - nextDiff)
             current = stepRange.minimum() - nextDiff;
         if (current > stepRange.maximum() - nextDiff)
             current = stepRange.maximum() - nextDiff;
-        setValueAsDecimal(current, DispatchInputAndChangeEvent, ec);
+        setValueAsDecimal(current, DispatchInputAndChangeEvent, IGNORE_EXCEPTION);
     }
-    if ((sign > 0 && current < stepRange.minimum()) || (sign < 0 && current > stepRange.maximum())) {
-        ExceptionCode ec;
-        setValueAsDecimal(sign > 0 ? stepRange.minimum() : stepRange.maximum(), DispatchInputAndChangeEvent, ec);
-    } else {
-        ExceptionCode ec;
+    if ((sign > 0 && current < stepRange.minimum()) || (sign < 0 && current > stepRange.maximum()))
+        setValueAsDecimal(sign > 0 ? stepRange.minimum() : stepRange.maximum(), DispatchInputAndChangeEvent, IGNORE_EXCEPTION);
+    else {
         if (stepMismatch(element()->value())) {
             ASSERT(!step.isZero());
             const Decimal base = stepRange.stepBase();
@@ -1125,13 +1123,13 @@ void InputType::stepUpFromRenderer(int n)
             if (newValue > stepRange.maximum())
                 newValue = stepRange.maximum();
 
-            setValueAsDecimal(newValue, n == 1 || n == -1 ? DispatchInputAndChangeEvent : DispatchNoEvent, ec);
+            setValueAsDecimal(newValue, n == 1 || n == -1 ? DispatchInputAndChangeEvent : DispatchNoEvent, IGNORE_EXCEPTION);
             if (n > 1)
-                applyStep(n - 1, AnyIsDefaultStep, DispatchInputAndChangeEvent, ec);
+                applyStep(n - 1, AnyIsDefaultStep, DispatchInputAndChangeEvent, IGNORE_EXCEPTION);
             else if (n < -1)
-                applyStep(n + 1, AnyIsDefaultStep, DispatchInputAndChangeEvent, ec);
+                applyStep(n + 1, AnyIsDefaultStep, DispatchInputAndChangeEvent, IGNORE_EXCEPTION);
         } else
-            applyStep(n, AnyIsDefaultStep, DispatchInputAndChangeEvent, ec);
+            applyStep(n, AnyIsDefaultStep, DispatchInputAndChangeEvent, IGNORE_EXCEPTION);
     }
 }
 
index 2bd61b6..5bf4f49 100644 (file)
@@ -481,8 +481,7 @@ void MediaController::bringElementUpToSpeed(HTMLMediaElement* element)
     // When the user agent is to bring a media element up to speed with its new media controller,
     // it must seek that media element to the MediaController's media controller position relative
     // to the media element's timeline.
-    ExceptionCode ignoredCode = 0;
-    element->seek(currentTime(), ignoredCode);
+    element->seek(currentTime(), IGNORE_EXCEPTION);
 }
 
 bool MediaController::isBlocked() const
@@ -544,12 +543,11 @@ void MediaController::scheduleEvent(const AtomicString& eventName)
 void MediaController::asyncEventTimerFired(Timer<MediaController>*)
 {
     Vector<RefPtr<Event> > pendingEvents;
-    ExceptionCode ec = 0;
-    
+
     m_pendingEvents.swap(pendingEvents);
     size_t count = pendingEvents.size();
     for (size_t index = 0; index < count; ++index)
-        dispatchEvent(pendingEvents[index].release(), ec);
+        dispatchEvent(pendingEvents[index].release(), IGNORE_EXCEPTION);
 }
 
 void MediaController::clearPositionTimerFired(Timer<MediaController>*)
index 2251512..f8a302c 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "DocumentLoader.h"
 #include "EventNames.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
 #include "HTMLEmbedElement.h"
@@ -71,9 +72,8 @@ private:
     
 void MediaDocumentParser::createDocumentStructure()
 {
-    ExceptionCode ec;
     RefPtr<Element> rootElement = document()->createElement(htmlTag, false);
-    document()->appendChild(rootElement, ec);
+    document()->appendChild(rootElement, IGNORE_EXCEPTION);
     document()->setCSSTarget(rootElement.get());
     static_cast<HTMLHtmlElement*>(rootElement.get())->insertedByParser();
 
@@ -81,7 +81,7 @@ void MediaDocumentParser::createDocumentStructure()
         document()->frame()->loader()->dispatchDocumentElementAvailable();
         
     RefPtr<Element> body = document()->createElement(bodyTag, false);
-    rootElement->appendChild(body, ec);
+    rootElement->appendChild(body, IGNORE_EXCEPTION);
 
     RefPtr<Element> mediaElement = document()->createElement(videoTag, false);
 
@@ -98,8 +98,8 @@ void MediaDocumentParser::createDocumentStructure()
     if (DocumentLoader* loader = document()->loader())
         source->setType(loader->responseMIMEType());
 
-    m_mediaElement->appendChild(sourceElement, ec);
-    body->appendChild(mediaElement, ec);
+    m_mediaElement->appendChild(sourceElement, IGNORE_EXCEPTION);
+    body->appendChild(mediaElement, IGNORE_EXCEPTION);
 
     Frame* frame = document()->frame();
     if (!frame)
@@ -233,8 +233,7 @@ void MediaDocument::replaceMediaElementTimerFired(Timer<MediaDocument>*)
         if (documentLoader)
             embedElement->setAttribute(typeAttr, documentLoader->writer()->mimeType());
 
-        ExceptionCode ec;
-        videoElement->parentNode()->replaceChild(embedElement, videoElement, ec);
+        videoElement->parentNode()->replaceChild(embedElement, videoElement, IGNORE_EXCEPTION);
     }
 }
 
index 474d991..9456b61 100644 (file)
@@ -26,6 +26,7 @@
 #include "PluginDocument.h"
 
 #include "DocumentLoader.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
 #include "FrameView.h"
@@ -67,9 +68,8 @@ private:
 
 void PluginDocumentParser::createDocumentStructure()
 {
-    ExceptionCode ec;
     RefPtr<Element> rootElement = document()->createElement(htmlTag, false);
-    document()->appendChild(rootElement, ec);
+    document()->appendChild(rootElement, IGNORE_EXCEPTION);
     static_cast<HTMLHtmlElement*>(rootElement.get())->insertedByParser();
 
     if (document()->frame() && document()->frame()->loader())
@@ -80,7 +80,7 @@ void PluginDocumentParser::createDocumentStructure()
     body->setAttribute(marginheightAttr, "0");
     body->setAttribute(styleAttr, "background-color: rgb(38,38,38)");
 
-    rootElement->appendChild(body, ec);
+    rootElement->appendChild(body, IGNORE_EXCEPTION);
         
     RefPtr<Element> embedElement = document()->createElement(embedTag, false);
         
@@ -98,7 +98,7 @@ void PluginDocumentParser::createDocumentStructure()
 
     static_cast<PluginDocument*>(document())->setPluginNode(m_embedElement);
 
-    body->appendChild(embedElement, ec);    
+    body->appendChild(embedElement, IGNORE_EXCEPTION);
 }
 
 void PluginDocumentParser::appendBytes(DocumentWriter*, const char*, size_t)
index beca7ad..75afd1e 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "AXObjectCache.h"
 #include "ElementShadow.h"
+#include "ExceptionCodePlaceholder.h"
 #include "HTMLDivElement.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
@@ -242,9 +243,8 @@ void RangeInputType::handleKeydownEvent(KeyboardEvent* event)
 
     if (newValue != current) {
         EventQueueScope scope;
-        ExceptionCode ec;
         TextFieldEventBehavior eventBehavior = DispatchChangeEvent;
-        setValueAsDecimal(newValue, eventBehavior, ec);
+        setValueAsDecimal(newValue, eventBehavior, IGNORE_EXCEPTION);
 
         if (AXObjectCache::accessibilityEnabled())
             element()->document()->axObjectCache()->postNotification(element(), AXObjectCache::AXValueChanged, true);
index d68ea03..c22474a 100644 (file)
@@ -28,6 +28,7 @@
 #include "TimeRanges.h"
 
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include <math.h>
 
 using namespace WebCore;
@@ -156,23 +157,21 @@ void TimeRanges::add(float start, float end)
 }
 
 bool TimeRanges::contain(float time) const
-{ 
-    ExceptionCode unused;
+{
     for (unsigned n = 0; n < length(); n++) {
-        if (time >= start(n, unused) && time <= end(n, unused))
+        if (time >= start(n, IGNORE_EXCEPTION) && time <= end(n, IGNORE_EXCEPTION))
             return true;
     }
     return false;
 }
 
 float TimeRanges::nearest(float time) const
-{ 
-    ExceptionCode unused;
+{
     float closest = 0;
     unsigned count = length();
     for (unsigned ndx = 0; ndx < count; ndx++) {
-        float startTime = start(ndx, unused);
-        float endTime = end(ndx, unused);
+        float startTime = start(ndx, IGNORE_EXCEPTION);
+        float endTime = end(ndx, IGNORE_EXCEPTION);
         if (time >= startTime && time <= endTime)
             return time;
         if (fabs(startTime - time) < closest)
index 4575cdb..704d470 100644 (file)
@@ -44,6 +44,7 @@
 #include "Console.h"
 #include "DOMPath.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FloatConversion.h"
 #include "FloatQuad.h"
 #include "FontCache.h"
@@ -1513,8 +1514,7 @@ void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement* image,
     if (!parseCompositeAndBlendOperator(compositeOperation, op, blendOp) || blendOp != BlendModeNormal)
         op = CompositeSourceOver;
 
-    ExceptionCode ec;
-    drawImage(image, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), op, BlendModeNormal, ec);
+    drawImage(image, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), op, BlendModeNormal, IGNORE_EXCEPTION);
 }
 
 void CanvasRenderingContext2D::setAlpha(float alpha)
index a043134..f54f879 100644 (file)
@@ -33,6 +33,7 @@
 #include "MediaControlElementTypes.h"
 
 #include "CSSValueKeywords.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FloatConversion.h"
 #include "HTMLNames.h"
 #include "MouseEvent.h"
@@ -263,9 +264,8 @@ float MediaControlSeekButtonElement::nextRate() const
 void MediaControlSeekButtonElement::seekTimerFired(Timer<MediaControlSeekButtonElement>*)
 {
     if (m_seekType == Skip) {
-        ExceptionCode ec;
         float skipTime = isForwardButton() ? cSkipTime : -cSkipTime;
-        mediaController()->setCurrentTime(mediaController()->currentTime() + skipTime, ec);
+        mediaController()->setCurrentTime(mediaController()->currentTime() + skipTime, IGNORE_EXCEPTION);
     } else
         mediaController()->setPlaybackRate(nextRate());
 }
index ba78bb0..dd5a2a9 100644 (file)
@@ -36,6 +36,7 @@
 #include "DOMTokenList.h"
 #include "EventNames.h"
 #include "EventTarget.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FloatConversion.h"
 #include "Frame.h"
 #include "GraphicsContext.h"
@@ -172,8 +173,7 @@ void MediaControlPanelElement::setPosition(const LayoutPoint& position)
     setInlineStyleProperty(CSSPropertyMarginLeft, 0.0, CSSPrimitiveValue::CSS_PX);
     setInlineStyleProperty(CSSPropertyMarginTop, 0.0, CSSPrimitiveValue::CSS_PX);
 
-    ExceptionCode ignored;
-    classList()->add("dragged", ignored);
+    classList()->add("dragged", IGNORE_EXCEPTION);
 }
 
 void MediaControlPanelElement::resetPosition()
@@ -183,8 +183,7 @@ void MediaControlPanelElement::resetPosition()
     removeInlineStyleProperty(CSSPropertyMarginLeft);
     removeInlineStyleProperty(CSSPropertyMarginTop);
 
-    ExceptionCode ignored;
-    classList()->remove("dragged", ignored);
+    classList()->remove("dragged", IGNORE_EXCEPTION);
 
     m_cumulativeDragOffset.setX(0);
     m_cumulativeDragOffset.setY(0);
@@ -384,8 +383,6 @@ void MediaControlStatusDisplayElement::update()
     if (newStateToDisplay == m_stateBeingDisplayed)
         return;
 
-    ExceptionCode e;
-
     if (m_stateBeingDisplayed == Nothing)
         show();
     else if (newStateToDisplay == Nothing)
@@ -395,13 +392,13 @@ void MediaControlStatusDisplayElement::update()
 
     switch (m_stateBeingDisplayed) {
     case Nothing:
-        setInnerText("", e);
+        setInnerText("", IGNORE_EXCEPTION);
         break;
     case Loading:
-        setInnerText(mediaElementLoadingStateText(), e);
+        setInnerText(mediaElementLoadingStateText(), IGNORE_EXCEPTION);
         break;
     case LiveBroadcast:
-        setInnerText(mediaElementLiveBroadcastStateText(), e);
+        setInnerText(mediaElementLiveBroadcastStateText(), IGNORE_EXCEPTION);
         break;
     }
 }
@@ -605,8 +602,7 @@ PassRefPtr<MediaControlRewindButtonElement> MediaControlRewindButtonElement::cre
 void MediaControlRewindButtonElement::defaultEventHandler(Event* event)
 {
     if (event->type() == eventNames().clickEvent) {
-        ExceptionCode ignoredCode;
-        mediaController()->setCurrentTime(max(0.0f, mediaController()->currentTime() - 30), ignoredCode);
+        mediaController()->setCurrentTime(max(0.0f, mediaController()->currentTime() - 30), IGNORE_EXCEPTION);
         event->setDefaultHandled();
     }
     HTMLInputElement::defaultEventHandler(event);
@@ -952,10 +948,8 @@ void MediaControlTimelineElement::defaultEventHandler(Event* event)
         return;
 
     float time = narrowPrecisionToFloat(value().toDouble());
-    if (event->type() == eventNames().inputEvent && time != mediaController()->currentTime()) {
-        ExceptionCode ec;
-        mediaController()->setCurrentTime(time, ec);
-    }
+    if (event->type() == eventNames().inputEvent && time != mediaController()->currentTime())
+        mediaController()->setCurrentTime(time, IGNORE_EXCEPTION);
 
     RenderSlider* slider = toRenderSlider(renderer());
     if (slider && slider->inDragMode())
index c00d36d..a5b3fb5 100644 (file)
@@ -29,6 +29,8 @@
 #if ENABLE(VIDEO)
 #include "MediaControls.h"
 
+#include "ExceptionCodePlaceholder.h"
+
 namespace WebCore {
 
 MediaControls::MediaControls(Document* document)
@@ -217,8 +219,7 @@ void MediaControls::updateCurrentTimeDisplay()
     if (!page)
         return;
 
-    ExceptionCode ec;
-    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsTime(now), ec);
+    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsTime(now), IGNORE_EXCEPTION);
     m_currentTimeDisplay->setCurrentValue(now);
 }
 
@@ -380,8 +381,7 @@ void MediaControls::createTextTrackDisplay()
         m_textDisplayContainer->setMediaController(m_mediaController);
 
     // Insert it before the first controller element so it always displays behind the controls.
-    ExceptionCode ec;
-    insertBefore(textDisplayContainer, m_panel, ec, true);
+    insertBefore(textDisplayContainer, m_panel, IGNORE_EXCEPTION, true);
     textDisplayContainer->createSubtrees(document());
     textDisplayContainer.release();
 }
index 9b51fe3..80952de 100644 (file)
@@ -30,6 +30,7 @@
 #include "MediaControlsApple.h"
 
 #include "Chrome.h"
+#include "ExceptionCodePlaceholder.h"
 #include "HTMLMediaElement.h"
 #include "HTMLNames.h"
 #include "MediaControlElements.h"
@@ -377,10 +378,9 @@ void MediaControlsApple::updateCurrentTimeDisplay()
         return;
 
     // Allow the theme to format the time.
-    ExceptionCode ec;
-    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), ec);
+    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), IGNORE_EXCEPTION);
     m_currentTimeDisplay->setCurrentValue(now);
-    m_timeRemainingDisplay->setInnerText(page->theme()->formatMediaControlsRemainingTime(now, duration), ec);
+    m_timeRemainingDisplay->setInnerText(page->theme()->formatMediaControlsRemainingTime(now, duration), IGNORE_EXCEPTION);
     m_timeRemainingDisplay->setCurrentValue(now - duration);
 }
 
index eb92657..69dce06 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "Chrome.h"
 #include "DOMTokenList.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FloatConversion.h"
 #include "Frame.h"
 #include "HTMLMediaElement.h"
@@ -197,8 +198,7 @@ void MediaControlEmbeddedPanelElement::setPosition(const LayoutPoint& position)
     setInlineStyleProperty(CSSPropertyMarginLeft, 0.0, CSSPrimitiveValue::CSS_PX);
     setInlineStyleProperty(CSSPropertyMarginTop, 0.0, CSSPrimitiveValue::CSS_PX);
 
-    ExceptionCode ignored;
-    classList()->add("dragged", ignored);
+    classList()->add("dragged", IGNORE_EXCEPTION);
 }
 
 void MediaControlEmbeddedPanelElement::resetPosition()
@@ -208,8 +208,7 @@ void MediaControlEmbeddedPanelElement::resetPosition()
     removeInlineStyleProperty(CSSPropertyMarginLeft);
     removeInlineStyleProperty(CSSPropertyMarginTop);
 
-    ExceptionCode ignored;
-    classList()->remove("dragged", ignored);
+    classList()->remove("dragged", IGNORE_EXCEPTION);
 
     m_cumulativeDragOffset.setX(0);
     m_cumulativeDragOffset.setY(0);
@@ -507,10 +506,8 @@ void MediaControlFullscreenTimelineElement::defaultEventHandler(Event* event)
         return;
 
     float time = narrowPrecisionToFloat(value().toDouble());
-    if (event->type() == eventNames().inputEvent && time != mediaController()->currentTime()) {
-        ExceptionCode ec;
-        mediaController()->setCurrentTime(time, ec);
-    }
+    if (event->type() == eventNames().inputEvent && time != mediaController()->currentTime())
+        mediaController()->setCurrentTime(time, IGNORE_EXCEPTION);
 
     RenderSlider* slider = toRenderSlider(renderer());
     if (slider && slider->inDragMode())
@@ -1011,14 +1008,13 @@ void MediaControlsBlackBerry::updateCurrentTimeDisplay()
         return;
 
     // Allow the theme to format the time.
-    ExceptionCode ec;
-    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), ec);
+    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), IGNORE_EXCEPTION);
     m_currentTimeDisplay->setCurrentValue(now);
-    m_fullscreenCurrentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), ec);
+    m_fullscreenCurrentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), IGNORE_EXCEPTION);
     m_fullscreenCurrentTimeDisplay->setCurrentValue(now);
-    m_timeRemainingDisplay->setInnerText(page->theme()->formatMediaControlsRemainingTime(now, duration), ec);
+    m_timeRemainingDisplay->setInnerText(page->theme()->formatMediaControlsRemainingTime(now, duration), IGNORE_EXCEPTION);
     m_timeRemainingDisplay->setCurrentValue(now - duration);
-    m_fullscreenTimeRemainingDisplay->setInnerText(page->theme()->formatMediaControlsRemainingTime(now, duration), ec);
+    m_fullscreenTimeRemainingDisplay->setInnerText(page->theme()->formatMediaControlsRemainingTime(now, duration), IGNORE_EXCEPTION);
     m_fullscreenTimeRemainingDisplay->setCurrentValue(now - duration);
 }
 
index 55cfac2..4641b9d 100644 (file)
@@ -29,6 +29,8 @@
 #if ENABLE(VIDEO)
 #include "MediaControlsChromium.h"
 
+#include "ExceptionCodePlaceholder.h"
+
 using namespace std;
 
 namespace WebCore {
@@ -185,8 +187,7 @@ void MediaControlsChromium::updateCurrentTimeDisplay()
     }
 
     // Allow the theme to format the time.
-    ExceptionCode ec;
-    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), ec);
+    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), IGNORE_EXCEPTION);
     m_currentTimeDisplay->setCurrentValue(now);
 }
 
index e68e0de..883c1ac 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "Document.h"
 #include "Event.h"
+#include "ExceptionCodePlaceholder.h"
 #include "InbandTextTrackPrivate.h"
 #include "Logging.h"
 #include "MediaPlayer.h"
@@ -120,19 +121,18 @@ void InbandTextTrack::addGenericCue(InbandTextTrackPrivate* trackPrivate, Generi
     cue->setFontSizeMultiplier(cueData->relativeFontSize());
     cue->setFontName(cueData->fontName());
 
-    ExceptionCode ec;
     if (cueData->position() > 0)
-        cue->setPosition(lround(cueData->position()), ec);
+        cue->setPosition(lround(cueData->position()), IGNORE_EXCEPTION);
     if (cueData->line() > 0)
-        cue->setLine(lround(cueData->line()), ec);
+        cue->setLine(lround(cueData->line()), IGNORE_EXCEPTION);
     if (cueData->size() > 0)
-        cue->setSize(lround(cueData->size()), ec);
+        cue->setSize(lround(cueData->size()), IGNORE_EXCEPTION);
     if (cueData->align() == GenericCueData::Start)
-        cue->setAlign(ASCIILiteral("start"), ec);
+        cue->setAlign(ASCIILiteral("start"), IGNORE_EXCEPTION);
     else if (cueData->align() == GenericCueData::Middle)
-        cue->setAlign(ASCIILiteral("middle"), ec);
+        cue->setAlign(ASCIILiteral("middle"), IGNORE_EXCEPTION);
     else if (cueData->align() == GenericCueData::End)
-        cue->setAlign(ASCIILiteral("end"), ec);
+        cue->setAlign(ASCIILiteral("end"), IGNORE_EXCEPTION);
     cue->setSnapToLines(false);
 
     if (hasCue(cue.get())) {
index 0fa8f26..14587e3 100644 (file)
@@ -38,6 +38,7 @@
 #include "CSSStyleSheet.h"
 #include "ContentSecurityPolicy.h"
 #include "DOMWindow.h"
+#include "ExceptionCodePlaceholder.h"
 #include "HTMLHeadElement.h"
 #include "InspectorDOMAgent.h"
 #include "InspectorHistory.h"
@@ -1164,8 +1165,7 @@ PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch> > InspectorCSSAgent::
         const CSSSelectorList& selectorList = rule->styleRule()->selectorList();
         long index = 0;
         for (const CSSSelector* selector = selectorList.first(); selector; selector = CSSSelectorList::next(selector)) {
-            ExceptionCode ec;
-            bool matched = element->webkitMatchesSelector(selector->selectorText(), ec);
+            bool matched = element->webkitMatchesSelector(selector->selectorText(), IGNORE_EXCEPTION);
             if (matched)
                 matchingSelectors->addItem(index);
             ++index;
index f39214a..07d6189 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "InspectorHistory.h"
 
+#include "ExceptionCodePlaceholder.h"
 #include "Node.h"
 
 namespace WebCore {
@@ -103,8 +104,7 @@ bool InspectorHistory::perform(PassOwnPtr<Action> action, ExceptionCode& ec)
 
 void InspectorHistory::markUndoableState()
 {
-    ExceptionCode ec;
-    perform(adoptPtr(new UndoableStateMark()), ec);
+    perform(adoptPtr(new UndoableStateMark()), IGNORE_EXCEPTION);
 }
 
 bool InspectorHistory::undo(ExceptionCode& ec)
index 3ce49b6..fe30662 100644 (file)
@@ -39,6 +39,7 @@
 #include "CachedResourceLoader.h"
 #include "Document.h"
 #include "DocumentLoader.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "HTTPHeaderMap.h"
@@ -602,7 +603,6 @@ void InspectorResourceAgent::getResponseBody(ErrorString* errorString, const Str
 void InspectorResourceAgent::replayXHR(ErrorString*, const String& requestId)
 {
     RefPtr<XMLHttpRequest> xhr = XMLHttpRequest::create(m_pageAgent->mainFrame()->document());
-    ExceptionCode code;
     String actualRequestId = requestId;
 
     XHRReplayData* xhrReplayData = m_resourcesData->xhrReplayData(requestId);
@@ -613,11 +613,11 @@ void InspectorResourceAgent::replayXHR(ErrorString*, const String& requestId)
     if (cachedResource)
         memoryCache()->remove(cachedResource);
 
-    xhr->open(xhrReplayData->method(), xhrReplayData->url(), xhrReplayData->async(), code);
+    xhr->open(xhrReplayData->method(), xhrReplayData->url(), xhrReplayData->async(), IGNORE_EXCEPTION);
     HTTPHeaderMap::const_iterator end = xhrReplayData->headers().end();
     for (HTTPHeaderMap::const_iterator it = xhrReplayData->headers().begin(); it!= end; ++it)
-        xhr->setRequestHeader(it->key, it->value, code);
-    xhr->sendFromInspector(xhrReplayData->formData(), code);
+        xhr->setRequestHeader(it->key, it->value, IGNORE_EXCEPTION);
+    xhr->sendFromInspector(xhrReplayData->formData(), IGNORE_EXCEPTION);
 }
 
 void InspectorResourceAgent::canClearBrowserCache(ErrorString*, bool* result)
index 953eec1..47bbf6c 100644 (file)
@@ -43,6 +43,7 @@
 #include "Event.h"
 #include "EventHandler.h"
 #include "EventNames.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FormState.h"
 #include "Frame.h"
 #include "FrameLoadRequest.h"
@@ -400,12 +401,11 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
         // which may make this difficult to implement. Maybe a special case of text-shadow?
         break;
     case ContextMenuItemTagStartSpeaking: {
-        ExceptionCode ec;
         RefPtr<Range> selectedRange = frame->selection()->toNormalizedRange();
-        if (!selectedRange || selectedRange->collapsed(ec)) {
+        if (!selectedRange || selectedRange->collapsed(IGNORE_EXCEPTION)) {
             Document* document = m_hitTestResult.innerNonSharedNode()->document();
             selectedRange = document->createRange();
-            selectedRange->selectNode(document->documentElement(), ec);
+            selectedRange->selectNode(document->documentElement(), IGNORE_EXCEPTION);
         }
         m_client->speak(plainText(selectedRange.get()));
         break;
index 42586f2..22f448c 100644 (file)
@@ -55,6 +55,7 @@
 #include "EventListener.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FloatRect.h"
 #include "Frame.h"
 #include "FrameLoadRequest.h"
@@ -1571,9 +1572,8 @@ static void didAddStorageEventListener(DOMWindow* window)
     // notifications about storage events that might be triggered in other processes. Rather
     // than subscribe to these notifications explicitly, we subscribe to them implicitly to
     // simplify the work done by the system. 
-    ExceptionCode unused;
-    window->localStorage(unused);
-    window->sessionStorage(unused);
+    window->localStorage(IGNORE_EXCEPTION);
+    window->sessionStorage(IGNORE_EXCEPTION);
 }
 
 bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
index e171653..a8a8002 100644 (file)
@@ -40,6 +40,7 @@
 #include "EditorClient.h"
 #include "Element.h"
 #include "EventHandler.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FloatRect.h"
 #include "Frame.h"
 #include "FrameLoadRequest.h"
@@ -144,10 +145,9 @@ static PassRefPtr<DocumentFragment> documentFragmentFromDragData(DragData* dragD
                         title = url;
                 }
                 RefPtr<Node> anchorText = document->createTextNode(title);
-                ExceptionCode ec;
-                anchor->appendChild(anchorText, ec);
+                anchor->appendChild(anchorText, IGNORE_EXCEPTION);
                 RefPtr<DocumentFragment> fragment = document->createDocumentFragment();
-                fragment->appendChild(anchor, ec);
+                fragment->appendChild(anchor, IGNORE_EXCEPTION);
                 return fragment.get();
             }
         }
index 10a3e5b..087a0aa 100644 (file)
@@ -43,6 +43,7 @@
 #include "Editor.h"
 #include "EditorClient.h"
 #include "EventNames.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FloatPoint.h"
 #include "FloatRect.h"
 #include "FocusController.h"
@@ -1917,8 +1918,7 @@ bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa
         event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
         0, 0, clipboard);
 
-    ExceptionCode ec;
-    dragTarget->dispatchEvent(me.get(), ec);
+    dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION);
     return me->defaultPrevented();
 }
 
@@ -3135,7 +3135,6 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
 
     bool backwardCompatibilityMode = needsKeyboardEventDisambiguationQuirks();
 
-    ExceptionCode ec;
     PlatformKeyboardEvent keyDownEvent = initialKeyEvent;    
     if (keyDownEvent.type() != PlatformEvent::RawKeyDown)
         keyDownEvent.disambiguateKeyDownEvent(PlatformEvent::RawKeyDown, backwardCompatibilityMode);
@@ -3145,7 +3144,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
     keydown->setTarget(node);
 
     if (initialKeyEvent.type() == PlatformEvent::RawKeyDown) {
-        node->dispatchEvent(keydown, ec);
+        node->dispatchEvent(keydown, IGNORE_EXCEPTION);
         // If frame changed as a result of keydown dispatch, then return true to avoid sending a subsequent keypress message to the new frame.
         bool changedFocusedFrame = m_frame->page() && m_frame != m_frame->page()->focusController()->focusedOrMainFrame();
         return keydown->defaultHandled() || keydown->defaultPrevented() || changedFocusedFrame;
@@ -3167,7 +3166,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
         keydown->setDefaultHandled();
     }
 
-    node->dispatchEvent(keydown, ec);
+    node->dispatchEvent(keydown, IGNORE_EXCEPTION);
     // If frame changed as a result of keydown dispatch, then return early to avoid sending a subsequent keypress message to the new frame.
     bool changedFocusedFrame = m_frame->page() && m_frame != m_frame->page()->focusController()->focusedOrMainFrame();
     bool keydownResult = keydown->defaultHandled() || keydown->defaultPrevented() || changedFocusedFrame;
@@ -3193,7 +3192,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
 #if PLATFORM(MAC)
     keypress->keypressCommands() = keydown->keypressCommands();
 #endif
-    node->dispatchEvent(keypress, ec);
+    node->dispatchEvent(keypress, IGNORE_EXCEPTION);
 
     return keydownResult || keypress->defaultPrevented() || keypress->defaultHandled();
 }
@@ -3547,8 +3546,7 @@ bool EventHandler::handleTextInputEvent(const String& text, Event* underlyingEve
     RefPtr<TextEvent> event = TextEvent::create(m_frame->document()->domWindow(), text, inputType);
     event->setUnderlyingEvent(underlyingEvent);
 
-    ExceptionCode ec;
-    target->dispatchEvent(event, ec);
+    target->dispatchEvent(event, IGNORE_EXCEPTION);
     return event->defaultHandled();
 }
     
index 7c600d7..ef9e868 100644 (file)
@@ -36,6 +36,7 @@
 #include "Event.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FileSystem.h"
 #include "FocusController.h"
 #include "Frame.h"
@@ -591,8 +592,7 @@ void Page::findStringMatchingRanges(const String& target, FindOptions options, i
         indexForSelection = NoMatchBeforeUserSelection;
         RefPtr<Range> selectedRange = frameWithSelection->selection()->selection().firstRange();
         for (size_t i = 0; i < matchRanges->size(); ++i) {
-            ExceptionCode ec;
-            if (selectedRange->compareBoundaryPoints(Range::START_TO_END, matchRanges->at(i).get(), ec) < 0) {
+            if (selectedRange->compareBoundaryPoints(Range::START_TO_END, matchRanges->at(i).get(), IGNORE_EXCEPTION) < 0) {
                 indexForSelection = i;
                 break;
             }
index 2c228af..25fc513 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "CSSValueKeywords.h"
 #include "CairoUtilitiesEfl.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FontDescription.h"
 #include "GraphicsContext.h"
 #include "HTMLInputElement.h"
@@ -1178,9 +1179,8 @@ bool RenderThemeEfl::paintMediaSliderTrack(RenderObject* object, const PaintInfo
     context->setStrokeStyle(NoStroke);
 
     for (unsigned index = 0; index < timeRanges->length(); ++index) {
-        ExceptionCode ignoredException;
-        float start = timeRanges->start(index, ignoredException);
-        float end = timeRanges->end(index, ignoredException);
+        float start = timeRanges->start(index, IGNORE_EXCEPTION);
+        float end = timeRanges->end(index, IGNORE_EXCEPTION);
         int width = ((end - start) * totalWidth) / mediaDuration;
         IntRect rangeRect;
         if (!index) {
index 561825a..5bb7c8c 100644 (file)
@@ -25,6 +25,7 @@
 #include "CookieManager.h"
 #include "Credential.h"
 #include "CredentialStorage.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameView.h"
 #include "GraphicsContext.h"
@@ -507,9 +508,8 @@ float MediaPlayerPrivate::percentLoaded()
     float buffered = 0;
     RefPtr<TimeRanges> timeRanges = this->buffered();
     for (unsigned i = 0; i < timeRanges->length(); ++i) {
-        ExceptionCode ignoredException;
-        float start = timeRanges->start(i, ignoredException);
-        float end = timeRanges->end(i, ignoredException);
+        float start = timeRanges->start(i, IGNORE_EXCEPTION);
+        float end = timeRanges->end(i, IGNORE_EXCEPTION);
         buffered += end - start;
     }
 
index 81eb5aa..7e82967 100644 (file)
@@ -26,6 +26,7 @@
 #include "RenderThemeGtk.h"
 
 #include "CSSValueKeywords.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FileList.h"
 #include "FileSystem.h"
 #include "FontDescription.h"
@@ -579,9 +580,8 @@ bool RenderThemeGtk::paintMediaSliderTrack(RenderObject* o, const PaintInfo& pai
     context->setStrokeStyle(NoStroke);
 
     for (unsigned index = 0; index < timeRanges->length(); ++index) {
-        ExceptionCode ignoredException;
-        float start = timeRanges->start(index, ignoredException);
-        float end = timeRanges->end(index, ignoredException);
+        float start = timeRanges->start(index, IGNORE_EXCEPTION);
+        float end = timeRanges->end(index, IGNORE_EXCEPTION);
         int width = ((end - start) * totalWidth) / mediaDuration;
         IntRect rangeRect;
         if (!index) {
index 3722307..5c934e3 100644 (file)
@@ -34,6 +34,7 @@
 #import "DocumentLoader.h"
 #import "Editor.h"
 #import "EditorClient.h"
+#import "ExceptionCodePlaceholder.h"
 #import "Frame.h"
 #import "FrameView.h"
 #import "FrameLoaderClient.h"
@@ -149,13 +150,12 @@ PassRefPtr<SharedBuffer> Pasteboard::getDataSelection(Frame* frame, const String
         return SharedBuffer::wrapNSData((NSData *)data.get());
     }
 
-    ExceptionCode ec;
     RefPtr<Range> range = frame->editor()->selectedRange();
-    Node* commonAncestor = range->commonAncestorContainer(ec);
+    Node* commonAncestor = range->commonAncestorContainer(IGNORE_EXCEPTION);
     ASSERT(commonAncestor);
     Node* enclosingAnchor = enclosingNodeWithTag(firstPositionInNode(commonAncestor), HTMLNames::aTag);
     if (enclosingAnchor && comparePositions(firstPositionInOrBeforeNode(range->startPosition().anchorNode()), range->startPosition()) >= 0)
-        range->setStart(enclosingAnchor, 0, ec);
+        range->setStart(enclosingAnchor, 0, IGNORE_EXCEPTION);
     
     NSAttributedString* attributedString = nil;
     RetainPtr<WebHTMLConverter> converter(AdoptNS, [[WebHTMLConverter alloc] initWithDOMRange:kit(range.get())]);
@@ -397,9 +397,8 @@ static PassRefPtr<DocumentFragment> documentFragmentWithImageResource(Frame* fra
     imageElement->setAttribute(HTMLNames::srcAttr, [URL isFileURL] ? [URL absoluteString] : resource->url());
     RefPtr<DocumentFragment> fragment = frame->document()->createDocumentFragment();
     if (fragment) {
-        ExceptionCode ec;
-        fragment->appendChild(imageElement, ec);
-        return fragment.release();       
+        fragment->appendChild(imageElement, IGNORE_EXCEPTION);
+        return fragment.release();
     }
     return 0;
 }
@@ -550,12 +549,11 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
         if ([URLString length] == 0)
             return nil;
         NSString *URLTitleString = [platformStrategies()->pasteboardStrategy()->stringForType(WebURLNamePboardType, m_pasteboardName) precomposedStringWithCanonicalMapping];
-        ExceptionCode ec;
         anchor->setAttribute(HTMLNames::hrefAttr, URLString);
-        anchor->appendChild(document->createTextNode(URLTitleString), ec);
+        anchor->appendChild(document->createTextNode(URLTitleString), IGNORE_EXCEPTION);
         fragment = document->createDocumentFragment();
         if (fragment) {
-            fragment->appendChild(anchor, ec);
+            fragment->appendChild(anchor, IGNORE_EXCEPTION);
             return fragment.release();
         }
     }
index 90f691d..dc38556 100644 (file)
@@ -28,6 +28,7 @@
 
 #import "WebVideoFullscreenHUDWindowController.h"
 
+#import "ExceptionCodePlaceholder.h"
 #import "FloatConversion.h"
 #import <WebCoreSystemInterface.h>
 #import <WebCore/HTMLMediaElement.h>
@@ -469,8 +470,7 @@ static NSTextField *createTimeTextField(NSRect frame)
 {
     if (![_delegate mediaElement])
         return;
-    WebCore::ExceptionCode e;
-    [_delegate mediaElement]->setCurrentTime(currentTime, e);
+    [_delegate mediaElement]->setCurrentTime(currentTime, IGNORE_EXCEPTION);
     [self updateTime];
 }
 
@@ -530,10 +530,9 @@ static NSTextField *createTimeTextField(NSRect frame)
 {
     if (![_delegate mediaElement])
         return;
-    WebCore::ExceptionCode e;
     if ([_delegate mediaElement]->muted())
         [_delegate mediaElement]->setMuted(false);
-    [_delegate mediaElement]->setVolume(volume / [self maxVolume], e);
+    [_delegate mediaElement]->setVolume(volume / [self maxVolume], IGNORE_EXCEPTION);
     [self updateVolume];
 }
 
index e09b50d..1f779c8 100644 (file)
@@ -34,6 +34,7 @@
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "Color.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FileList.h"
 #include "Font.h"
 #include "FontSelector.h"
@@ -790,10 +791,9 @@ bool RenderThemeQt::paintMediaSliderTrack(RenderObject* o, const PaintInfo& pain
             p->painter->setBrush(getMediaControlForegroundColor());
 
             // Paint each buffered section
-            ExceptionCode ex;
             for (int i = 0; i < buffered->length(); i++) {
-                float startX = (buffered->start(i, ex) / player->duration()) * 100;
-                float width = ((buffered->end(i, ex) / player->duration()) * 100) - startX;
+                float startX = (buffered->start(i, IGNORE_EXCEPTION) / player->duration()) * 100;
+                float width = ((buffered->end(i, IGNORE_EXCEPTION) / player->duration()) * 100) - startX;
                 p->painter->drawRect(startX, 37, width, 26);
             }
         }
index 1e4c4f0..e8d7d00 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "RenderNamedFlowThread.h"
 
+#include "ExceptionCodePlaceholder.h"
 #include "FlowThreadController.h"
 #include "InlineTextBox.h"
 #include "InspectorInstrumentation.h"
@@ -477,7 +478,6 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
         if (!contentNode->renderer())
             continue;
 
-        ExceptionCode ignoredException;
         RefPtr<Range> range = Range::create(contentNode->document());
         bool foundStartPosition = false;
         bool startsAboveRegion = true;
@@ -516,16 +516,16 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
             if (!boxIntersectsRegion(logicalTopForRenderer, logicalBottomForRenderer, logicalTopForRegion, logicalBottomForRegion)) {
                 if (foundStartPosition) {
                     if (!startsAboveRegion) {
-                        if (range->intersectsNode(node, ignoredException))
-                            range->setEndBefore(node, ignoredException);
-                        rangeObjects.append(range->cloneRange(ignoredException));
+                        if (range->intersectsNode(node, IGNORE_EXCEPTION))
+                            range->setEndBefore(node, IGNORE_EXCEPTION);
+                        rangeObjects.append(range->cloneRange(IGNORE_EXCEPTION));
                         range = Range::create(contentNode->document());
                         startsAboveRegion = true;
                     } else
                         skipOverOutsideNodes = true;
                 }
                 if (skipOverOutsideNodes)
-                    range->setStartAfter(node, ignoredException);
+                    range->setStartAfter(node, IGNORE_EXCEPTION);
                 foundStartPosition = false;
                 continue;
             }
@@ -552,7 +552,7 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
                 // the range is closed.
                 if (startsAboveRegion) {
                     startsAboveRegion = false;
-                    range->setStartBefore(node, ignoredException);
+                    range->setStartBefore(node, IGNORE_EXCEPTION);
                 }
             }
             skipOverOutsideNodes  = false;
@@ -586,7 +586,7 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
                 // for elements that ends inside the region, set the end position to be after them
                 // allow this end position to be changed only by other elements that are not descendants of the current end node
                 if (endsBelowRegion || (!endsBelowRegion && !node->isDescendantOf(lastEndNode))) {
-                    range->setEndAfter(node, ignoredException);
+                    range->setEndAfter(node, IGNORE_EXCEPTION);
                     endsBelowRegion = false;
                     lastEndNode = node;
                 }
index dbc843d..151ac02 100644 (file)
@@ -21,6 +21,7 @@
 #import "RenderThemeMac.h"
 
 #import "Element.h"
+#import "ExceptionCodePlaceholder.h"
 #import "GraphicsContextCG.h"
 #import "HTMLMediaElement.h"
 #import "LocalCurrentGraphicsContext.h"
@@ -234,8 +235,7 @@ bool RenderThemeMac::paintMediaSliderTrack(RenderObject* o, const PaintInfo& pai
         return false;
 
     RefPtr<TimeRanges> timeRanges = mediaElement->buffered();
-    ExceptionCode ignoredException;
-    float timeLoaded = timeRanges->length() ? timeRanges->end(0, ignoredException) : 0;
+    float timeLoaded = timeRanges->length() ? timeRanges->end(0, IGNORE_EXCEPTION) : 0;
     float currentTime = mediaElement->currentTime();
     float duration = mediaElement->duration();
     if (isnan(duration))
index 6a9d31b..facd092 100644 (file)
@@ -27,6 +27,7 @@
 #include "ElementShadow.h"
 #include "EventListener.h"
 #include "EventNames.h"
+#include "ExceptionCodePlaceholder.h"
 #include "MutationEvent.h"
 #include "NodeRenderingContext.h"
 #include "RenderSVGInline.h"
@@ -165,12 +166,11 @@ void SVGTRefElement::detachTarget()
     m_targetListener->detach();
 
     String emptyContent;
-    ExceptionCode ignore = 0;
 
     ASSERT(shadow());
     Node* container = shadow()->oldestShadowRoot()->firstChild();
     if (container)
-        container->setTextContent(emptyContent, ignore);
+        container->setTextContent(emptyContent, IGNORE_EXCEPTION);
 
     if (!inDocument())
         return;
index 190bf37..b605d87 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "Document.h"
 #include "Element.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "Page.h"
 #include "ScriptSourceCode.h"
@@ -78,8 +79,7 @@ void XMLTreeViewer::transformDocumentToTreeView()
 
     String cssString(reinterpret_cast<const char*>(XMLViewer_css), sizeof(XMLViewer_css));
     RefPtr<Text> text = m_document->createTextNode(cssString);
-    ExceptionCode exceptionCode;
-    m_document->getElementById("xml-viewer-style")->appendChild(text, exceptionCode);
+    m_document->getElementById("xml-viewer-style")->appendChild(text, IGNORE_EXCEPTION);
     m_document->styleResolverChanged(RecalcStyleImmediately);
 }
 
index c72a52d..50bb4ff 100644 (file)
@@ -34,6 +34,7 @@
 #include "Document.h"
 #include "DocumentFragment.h"
 #include "DocumentType.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "FrameView.h"
@@ -864,8 +865,7 @@ void XMLDocumentParser::endElementNs()
 
     if (!scriptingContentIsAllowed(m_scriptingPermission) && n->isElementNode() && toScriptElement(static_cast<Element*>(n.get()))) {
         popCurrentNode();
-        ExceptionCode ec;
-        n->remove(ec);
+        n->remove(IGNORE_EXCEPTION);
         return;
     }
 
index c4d0ded..a2ed524 100644 (file)
@@ -33,6 +33,7 @@
 #include "Document.h"
 #include "DocumentFragment.h"
 #include "DocumentType.h"
+#include "ExceptionCodePlaceholder.h"
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "FrameView.h"
@@ -512,8 +513,7 @@ void XMLDocumentParser::parseEndElement()
 
     if (!scriptingContentIsAllowed(m_scriptingPermission) && n->isElementNode() && toScriptElement(static_cast<Element*>(n.get()))) {
         popCurrentNode();
-        ExceptionCode ec;
-        n->remove(ec);
+        n->remove(IGNORE_EXCEPTION);
         return;
     }