Commit f0aff0ca authored by hiroshige's avatar hiroshige Committed by Commit bot

Add a unit test for Issue 711703

BUG=711703

Review-Url: https://codereview.chromium.org/2828973002
Cr-Commit-Position: refs/heads/master@{#466903}
parent 3d792ae9
......@@ -417,6 +417,23 @@ TEST_F(ScriptStreamingTest, EncodingFromBOM) {
EXPECT_FALSE(try_catch.HasCaught());
}
// A test for crbug.com/711703. Should not crash.
TEST_F(ScriptStreamingTest, GarbageCollectDuringStreaming) {
V8TestingScope scope;
ScriptStreamer::StartStreaming(
GetPendingScript(), ScriptStreamer::kParsingBlocking, settings_.get(),
scope.GetScriptState(), loading_task_runner_);
TestPendingScriptClient* client = new TestPendingScriptClient;
GetPendingScript()->WatchForLoad(client);
EXPECT_FALSE(client->Finished());
pending_script_ = nullptr;
ThreadState::Current()->CollectGarbage(BlinkGC::kNoHeapPointersOnStack,
BlinkGC::kGCWithSweep,
BlinkGC::kForcedGC);
}
} // namespace
} // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment