Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(781)

Unified Diff: third_party/WebKit/Source/core/svg/SVGPath.cpp

Issue 1544673003: Refactor propagation of parsing errors for SVG attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGPath.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPath.cpp b/third_party/WebKit/Source/core/svg/SVGPath.cpp
index d8db81ab55c8b05305b4e828bd53face919a58fb..0f6500a6e96e622f84f911f96636ddb30f3028c2 100644
--- a/third_party/WebKit/Source/core/svg/SVGPath.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPath.cpp
@@ -22,7 +22,6 @@
#include "core/svg/SVGPath.h"
-#include "bindings/core/v8/ExceptionState.h"
#include "core/SVGNames.h"
#include "core/svg/SVGAnimationElement.h"
#include "core/svg/SVGPathBlender.h"
@@ -94,13 +93,14 @@ PassRefPtrWillBeRawPtr<SVGPath> SVGPath::clone() const
return SVGPath::create(m_pathValue);
}
-
-void SVGPath::setValueAsString(const String& string, ExceptionState& exceptionState)
+SVGParsingError SVGPath::setValueAsString(const String& string)
{
+ SVGParsingError parseStatus = NoError;
OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create();
if (!buildByteStreamFromString(string, *byteStream))
- exceptionState.throwDOMException(SyntaxError, "Problem parsing path \"" + string + "\"");
+ parseStatus = ParsingAttributeFailedError;
m_pathValue = CSSPathValue::create(byteStream.release());
+ return parseStatus;
}
PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGPath::cloneForAnimation(const String& value) const

Powered by Google App Engine
This is Rietveld 408576698