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

Unified Diff: Source/bindings/v8/custom/V8BlobCustomHelpers.cpp

Issue 111373003: Migrate bindings constructors to the new ExceptionState model. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh. Created 7 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
« no previous file with comments | « Source/bindings/v8/custom/V8BlobCustomHelpers.h ('k') | Source/bindings/v8/custom/V8FileCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8BlobCustomHelpers.cpp
diff --git a/Source/bindings/v8/custom/V8BlobCustomHelpers.cpp b/Source/bindings/v8/custom/V8BlobCustomHelpers.cpp
index 5d9af5fcb45562bb3ea75b4e7276c0f3eb99ffa2..62bdc36e7b292835d41c92db487986c1823b6d67 100644
--- a/Source/bindings/v8/custom/V8BlobCustomHelpers.cpp
+++ b/Source/bindings/v8/custom/V8BlobCustomHelpers.cpp
@@ -33,6 +33,7 @@
#include "V8Blob.h"
#include "bindings/v8/Dictionary.h"
+#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8Utilities.h"
#include "bindings/v8/custom/V8ArrayBufferCustom.h"
@@ -68,7 +69,7 @@ void ParsedProperties::setDefaultLastModified()
setLastModified(currentTime());
}
-bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, const char* blobClassName, v8::Isolate* isolate)
+bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, const char* blobClassName, ExceptionState& exceptionState, v8::Isolate* isolate)
{
ASSERT(m_endings == "transparent");
@@ -77,7 +78,7 @@ bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, co
V8TRYCATCH_RETURN(bool, containsEndings, dictionary.get("endings", m_endings), false);
if (containsEndings) {
if (m_endings != "transparent" && m_endings != "native") {
- throwTypeError(ExceptionMessages::failedToConstruct(blobClassName, "The \"endings\" property must be either \"transparent\" or \"native\"."), isolate);
+ exceptionState.throwTypeError("The 'endings' property must be either 'transparent' or 'native'.");
return false;
}
}
@@ -85,7 +86,7 @@ bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, co
V8TRYCATCH_RETURN(bool, containsType, dictionary.get("type", m_contentType), false);
if (containsType) {
if (!m_contentType.containsOnlyASCII()) {
- throwError(v8SyntaxError, ExceptionMessages::failedToConstruct(blobClassName, "The \"type\" property must consist of ASCII characters."), isolate);
+ exceptionState.throwDOMException(SyntaxError, "The 'type' property must consist of ASCII characters.");
return false;
}
m_contentType = m_contentType.lower();
« no previous file with comments | « Source/bindings/v8/custom/V8BlobCustomHelpers.h ('k') | Source/bindings/v8/custom/V8FileCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698