diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/loader/resource/script_resource.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/loader/resource/script_resource.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chromium/third_party/blink/renderer/core/loader/resource/script_resource.cc b/chromium/third_party/blink/renderer/core/loader/resource/script_resource.cc index 71c17ddb839..dec020fe0b8 100644 --- a/chromium/third_party/blink/renderer/core/loader/resource/script_resource.cc +++ b/chromium/third_party/blink/renderer/core/loader/resource/script_resource.cc @@ -267,7 +267,15 @@ void ScriptResource::ResponseBodyReceived( WTF::BindRepeating(&ScriptResource::OnDataPipeReadable, WrapWeakPersistent(this))); CHECK(data_pipe_); - watcher_->ArmOrNotify(); + + MojoResult ready_result; + mojo::HandleSignalsState ready_state; + MojoResult rv = watcher_->Arm(&ready_result, &ready_state); + if (rv == MOJO_RESULT_OK) + return; + + DCHECK_EQ(MOJO_RESULT_FAILED_PRECONDITION, rv); + OnDataPipeReadable(ready_result, ready_state); } void ScriptResource::OnDataPipeReadable(MojoResult result, @@ -407,7 +415,7 @@ void ScriptResource::StartStreaming( return; } - static bool script_streaming_enabled = + static const bool script_streaming_enabled = base::FeatureList::IsEnabled(features::kScriptStreaming); if (!script_streaming_enabled) { return; |