Commit 2de4f310 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Enter ScriptState::Scope in QuicTransport::OnConnectionError

We need to enter a scope before creating an error object.

Bug: 1011392
Change-Id: I7b01d7f9cfa75efb19837387c105e6acd4322a10
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007089
Auto-Submit: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732782}
parent 9b090d42
......@@ -344,6 +344,7 @@ void QuicTransport::OnConnectionError() {
DVLOG(1) << "QuicTransport::OnConnectionError() this=" << this;
if (!cleanly_closed_) {
ScriptState::Scope scope(script_state_);
v8::Local<v8::Value> reason = V8ThrowException::CreateTypeError(
script_state_->GetIsolate(), "Connection lost.");
received_datagrams_controller_->Error(reason);
......
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