Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cherry-pick 54454ec7fbcb from chromium #23017

Merged
merged 4 commits into from Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions patches/chromium/.patches
Expand Up @@ -100,3 +100,4 @@ move_readablestream_requests_onto_the_stack_before_iteration.patch
streams_convert_state_dchecks_to_checks.patch
audiocontext_haspendingactivity_unless_it_s_closed.patch
protect_automatic_pull_handlers_with_mutex.patch
cherry-pick-54454ec7fbcb.patch
30 changes: 30 additions & 0 deletions patches/chromium/cherry-pick-54454ec7fbcb.patch
@@ -0,0 +1,30 @@
From 54454ec7fbcbd043f7eafea03049e53ccec5e04f Mon Sep 17 00:00:00 2001
From: David Manouchehri <david@davidmanouchehri.com>
Date: Wed, 19 Feb 2020 00:29:19 +0000
Subject: [PATCH] Verify if the context is still available.

Bug: 1051748
Change-Id: I6bbef3ef50930048984593270fbe39a59a6d61f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2053167
Reviewed-by: Shrek Shao <shrekshao@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: David Manouchehri <david@davidmanouchehri.com>
Cr-Commit-Position: refs/heads/master@{#742401}
---
.../renderer/modules/webgl/webgl_rendering_context_base.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
index 270d3c99e8d15..e6b812db1f52d 100644
--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -7606,7 +7606,7 @@ void WebGLRenderingContextBase::PrintGLErrorToConsole(const String& message) {

void WebGLRenderingContextBase::PrintWarningToConsole(const String& message) {
blink::ExecutionContext* context = Host()->GetTopExecutionContext();
- if (context) {
+ if (context && !context->IsContextDestroyed()) {
context->AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
mojom::ConsoleMessageSource::kRendering,
mojom::ConsoleMessageLevel::kWarning, message));