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

Unified Diff: third_party/WebKit/Source/core/streams/ReadableStreamTest.cpp

Issue 1743763004: Use v8::MicrotasksScope internally in V8RecursionScope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8rs-2-endofscope
Patch Set: v8_helpers Created 4 years, 9 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/core/streams/ReadableStreamTest.cpp
diff --git a/third_party/WebKit/Source/core/streams/ReadableStreamTest.cpp b/third_party/WebKit/Source/core/streams/ReadableStreamTest.cpp
index 63aa1a2557b023c9dc67098decf7e90ec2fc05d6..8ee42c8392f5c761fb0d6482a7e9dd60b3ac25ae 100644
--- a/third_party/WebKit/Source/core/streams/ReadableStreamTest.cpp
+++ b/third_party/WebKit/Source/core/streams/ReadableStreamTest.cpp
@@ -304,7 +304,7 @@ TEST_F(ReadableStreamTest, CloseWhenReadable)
stream->read(getScriptState());
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ(ReadableStream::Readable, stream->stateInternal());
EXPECT_FALSE(stream->isPulling());
@@ -335,7 +335,7 @@ TEST_F(ReadableStreamTest, CancelWhenClosed)
EXPECT_TRUE(onFulfilled.isNull());
EXPECT_TRUE(onRejected.isNull());
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ("undefined", onFulfilled);
EXPECT_TRUE(onRejected.isNull());
}
@@ -358,7 +358,7 @@ TEST_F(ReadableStreamTest, CancelWhenErrored)
EXPECT_TRUE(onFulfilled.isNull());
EXPECT_TRUE(onRejected.isNull());
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_TRUE(onFulfilled.isNull());
EXPECT_EQ("NotFoundError: error", onRejected);
}
@@ -392,7 +392,7 @@ TEST_F(ReadableStreamTest, CancelWhenReadable)
EXPECT_TRUE(onCancelFulfilled.isNull());
EXPECT_TRUE(onCancelRejected.isNull());
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ("undefined", onCancelFulfilled);
EXPECT_TRUE(onCancelRejected.isNull());
}
@@ -416,7 +416,7 @@ TEST_F(ReadableStreamTest, CancelWhenLocked)
EXPECT_TRUE(onFulfilled.isNull());
EXPECT_TRUE(onRejected.isNull());
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_TRUE(onFulfilled.isNull());
EXPECT_EQ("TypeError: this stream is locked to a ReadableStreamReader", onRejected);
@@ -563,7 +563,7 @@ TEST_F(ReadableStreamTest, GetClosedReader)
EXPECT_TRUE(onFulfilled.isNull());
EXPECT_TRUE(onRejected.isNull());
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_EQ("undefined", onFulfilled);
EXPECT_TRUE(onRejected.isNull());
}
@@ -586,7 +586,7 @@ TEST_F(ReadableStreamTest, GetErroredReader)
EXPECT_TRUE(onFulfilled.isNull());
EXPECT_TRUE(onRejected.isNull());
- isolate()->RunMicrotasks();
+ v8::MicrotasksScope::PerformCheckpoint(isolate());
EXPECT_TRUE(onFulfilled.isNull());
EXPECT_EQ("SyntaxError: some error", onRejected);
}

Powered by Google App Engine
This is Rietveld 408576698