Index: third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp |
diff --git a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp |
index 923e6720a3f5af256beb66c474c13190d1e4267e..bd4a4dfcfa9dc8c685128bd2574425beb071c3de 100644 |
--- a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp |
+++ b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp |
@@ -6,6 +6,7 @@ |
#include "bindings/core/v8/ScriptState.h" |
#include "bindings/core/v8/V8HiddenValue.h" |
+#include "bindings/core/v8/V8ThrowException.h" |
#include "core/dom/DOMArrayBuffer.h" |
#include "core/dom/DOMTypedArray.h" |
#include "core/dom/ExceptionCode.h" |
@@ -285,7 +286,11 @@ void BodyStreamBuffer::close() { |
} |
void BodyStreamBuffer::error() { |
- controller()->error(DOMException::create(NetworkError, "network error")); |
+ { |
+ ScriptState::Scope scope(m_scriptState.get()); |
+ controller()->error(V8ThrowException::createTypeError( |
+ m_scriptState->isolate(), "network error")); |
+ } |
cancelConsumer(); |
} |