Title: [142139] trunk/Source/WebCore
Revision
142139
Author
[email protected]
Date
2013-02-07 09:18:47 -0800 (Thu, 07 Feb 2013)

Log Message

Don't ASSERT things about uninitialized variables.
https://bugs.webkit.org/show_bug.cgi?id=109187

Reviewed by Jochen Eisinger.

Rather than ASSERTing that an uninitialized ExceptionCode is non-zero
after some method executes, we should use the ASSERT_NO_EXCEPTION macro.

* editing/markup.cpp:
(WebCore::removeElementPreservingChildren):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (142138 => 142139)


--- trunk/Source/WebCore/ChangeLog	2013-02-07 17:17:26 UTC (rev 142138)
+++ trunk/Source/WebCore/ChangeLog	2013-02-07 17:18:47 UTC (rev 142139)
@@ -1,3 +1,16 @@
+2013-02-07  Mike West  <[email protected]>
+
+        Don't ASSERT things about uninitialized variables.
+        https://bugs.webkit.org/show_bug.cgi?id=109187
+
+        Reviewed by Jochen Eisinger.
+
+        Rather than ASSERTing that an uninitialized ExceptionCode is non-zero
+        after some method executes, we should use the ASSERT_NO_EXCEPTION macro.
+
+        * editing/markup.cpp:
+        (WebCore::removeElementPreservingChildren):
+
 2013-02-07  Andrey Lushnikov  <[email protected]>
 
         Web Inspector: [Regression] breakpoint condition not editable

Modified: trunk/Source/WebCore/editing/markup.cpp (142138 => 142139)


--- trunk/Source/WebCore/editing/markup.cpp	2013-02-07 17:17:26 UTC (rev 142138)
+++ trunk/Source/WebCore/editing/markup.cpp	2013-02-07 17:18:47 UTC (rev 142139)
@@ -1042,18 +1042,13 @@
 
 static inline void removeElementPreservingChildren(PassRefPtr<DocumentFragment> fragment, HTMLElement* element)
 {
-    ExceptionCode ignoredExceptionCode;
-
     RefPtr<Node> nextChild;
     for (RefPtr<Node> child = element->firstChild(); child; child = nextChild) {
         nextChild = child->nextSibling();
-        element->removeChild(child.get(), ignoredExceptionCode);
-        ASSERT(!ignoredExceptionCode);
-        fragment->insertBefore(child, element, ignoredExceptionCode);
-        ASSERT(!ignoredExceptionCode);
+        element->removeChild(child.get(), ASSERT_NO_EXCEPTION);
+        fragment->insertBefore(child, element, ASSERT_NO_EXCEPTION);
     }
-    fragment->removeChild(element, ignoredExceptionCode);
-    ASSERT(!ignoredExceptionCode);
+    fragment->removeChild(element, ASSERT_NO_EXCEPTION);
 }
 
 PassRefPtr<DocumentFragment> createContextualFragment(const String& markup, HTMLElement* element, FragmentScriptingPermission scriptingPermission, ExceptionCode& ec)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to