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

Unified Diff: third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp

Issue 2141383002: [Fetch API] Remove HandleScope to protect local handles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 5 months 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/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 a339b1ecd5c3102b53769531af7d2b6cc6702c4a..b21ff4fb44965729d1bd51f6a49de42359eabc0e 100644
--- a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
@@ -106,7 +106,6 @@ BodyStreamBuffer::BodyStreamBuffer(ScriptState* scriptState, std::unique_ptr<Fet
, m_madeFromReadableStream(false)
{
if (RuntimeEnabledFeatures::responseBodyWithV8ExtraStreamEnabled()) {
- ScriptState::Scope scope(scriptState);
if (isTerminating(scriptState)) {
m_reader = nullptr;
m_handle = nullptr;
@@ -141,7 +140,6 @@ BodyStreamBuffer::BodyStreamBuffer(ScriptState* scriptState, ScriptValue stream)
, m_scriptState(scriptState)
, m_madeFromReadableStream(true)
{
- ScriptState::Scope scope(scriptState);
DCHECK(RuntimeEnabledFeatures::responseBodyWithV8ExtraStreamEnabled());
DCHECK(ReadableStreamOperations::isReadableStream(scriptState, stream));
if (isTerminating(scriptState))
@@ -228,7 +226,6 @@ void BodyStreamBuffer::tee(BodyStreamBuffer** branch1, BodyStreamBuffer** branch
*branch2 = nullptr;
if (m_madeFromReadableStream) {
- ScriptState::Scope scope(m_scriptState.get());
ScriptValue stream1, stream2;
ReadableStreamOperations::tee(m_scriptState.get(), stream(), &stream1, &stream2);
*branch1 = new BodyStreamBuffer(m_scriptState.get(), stream1);

Powered by Google App Engine
This is Rietveld 408576698