| Index: third_party/WebKit/Source/bindings/core/v8/ReadableStreamOperationsTest.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ReadableStreamOperationsTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ReadableStreamOperationsTest.cpp
|
| index 3a68a79691b79b488033b24542e14a7f1f1504d2..ba889fef8d8436b41bc85f095aa72ac330b0abc2 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ReadableStreamOperationsTest.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ReadableStreamOperationsTest.cpp
|
| @@ -12,6 +12,7 @@
|
| #include "bindings/core/v8/V8BindingForTesting.h"
|
| #include "bindings/core/v8/V8BindingMacros.h"
|
| #include "bindings/core/v8/V8IteratorResultValue.h"
|
| +#include "bindings/core/v8/V8RecursionScope.h"
|
| #include "bindings/core/v8/V8ThrowException.h"
|
| #include "core/dom/Document.h"
|
| #include "core/streams/ReadableStreamController.h"
|
| @@ -138,7 +139,7 @@ public:
|
| ~ReadableStreamOperationsTest() override
|
| {
|
| // Execute all pending microtasks
|
| - isolate()->RunMicrotasks();
|
| + v8::MicrotasksScope::PerformCheckpoint(isolate());
|
| EXPECT_FALSE(m_block.HasCaught());
|
| }
|
|
|
| @@ -149,6 +150,7 @@ public:
|
| {
|
| v8::Local<v8::String> source;
|
| v8::Local<v8::Script> script;
|
| + V8RecursionScope::MicrotaskSuppression microtasks(isolate());
|
| if (!v8Call(v8::String::NewFromUtf8(isolate(), s, v8::NewStringType::kNormal), source)) {
|
| ADD_FAILURE();
|
| return ScriptValue();
|
| @@ -253,12 +255,12 @@ TEST_F(ReadableStreamOperationsTest, Read)
|
| Function::createFunction(getScriptState(), it2),
|
| NotReached::createFunction(getScriptState()));
|
|
|
| - isolate()->RunMicrotasks();
|
| + v8::MicrotasksScope::PerformCheckpoint(isolate());
|
| EXPECT_FALSE(it1->isSet());
|
| EXPECT_FALSE(it2->isSet());
|
|
|
| ASSERT_FALSE(evalWithPrintingError("controller.enqueue('hello')").isEmpty());
|
| - isolate()->RunMicrotasks();
|
| + v8::MicrotasksScope::PerformCheckpoint(isolate());
|
| EXPECT_TRUE(it1->isSet());
|
| EXPECT_TRUE(it1->isValid());
|
| EXPECT_FALSE(it1->isDone());
|
| @@ -266,7 +268,7 @@ TEST_F(ReadableStreamOperationsTest, Read)
|
| EXPECT_FALSE(it2->isSet());
|
|
|
| ASSERT_FALSE(evalWithPrintingError("controller.close()").isEmpty());
|
| - isolate()->RunMicrotasks();
|
| + v8::MicrotasksScope::PerformCheckpoint(isolate());
|
| EXPECT_TRUE(it1->isSet());
|
| EXPECT_TRUE(it1->isValid());
|
| EXPECT_FALSE(it1->isDone());
|
| @@ -309,7 +311,7 @@ TEST_F(ReadableStreamOperationsTest, CreateReadableStreamWithCustomUnderlyingSou
|
| ReadableStreamOperations::read(getScriptState(), reader).then(Function::createFunction(getScriptState(), it2), NotReached::createFunction(getScriptState()));
|
| ReadableStreamOperations::read(getScriptState(), reader).then(Function::createFunction(getScriptState(), it3), NotReached::createFunction(getScriptState()));
|
|
|
| - isolate()->RunMicrotasks();
|
| + v8::MicrotasksScope::PerformCheckpoint(isolate());
|
|
|
| EXPECT_EQ(10, underlyingSource->desiredSize());
|
|
|
| @@ -326,7 +328,7 @@ TEST_F(ReadableStreamOperationsTest, CreateReadableStreamWithCustomUnderlyingSou
|
| EXPECT_FALSE(it3->isSet());
|
|
|
| underlyingSource->close();
|
| - isolate()->RunMicrotasks();
|
| + v8::MicrotasksScope::PerformCheckpoint(isolate());
|
|
|
| EXPECT_TRUE(it3->isSet());
|
| EXPECT_TRUE(it3->isValid());
|
|
|