Commit f392050d authored by shrekshao's avatar shrekshao Committed by Commit Bot

Speculative fix for potential NULL pointer in PrintWarningToConsole

Couldn't reproduce this clusterfuzz bug locally. But make a speculative
fix attempt.

Bug: 1008300
Change-Id: Iab02f2b3997883ae05cccd1e1ea916a206952b60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838547Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
Cr-Commit-Position: refs/heads/master@{#703036}
parent 4f223c05
......@@ -7516,9 +7516,12 @@ void WebGLRenderingContextBase::PrintGLErrorToConsole(const String& message) {
}
void WebGLRenderingContextBase::PrintWarningToConsole(const String& message) {
Host()->GetTopExecutionContext()->AddConsoleMessage(
ConsoleMessage::Create(mojom::ConsoleMessageSource::kRendering,
mojom::ConsoleMessageLevel::kWarning, message));
blink::ExecutionContext* context = Host()->GetTopExecutionContext();
if (context) {
context->AddConsoleMessage(
ConsoleMessage::Create(mojom::ConsoleMessageSource::kRendering,
mojom::ConsoleMessageLevel::kWarning, message));
}
}
bool WebGLRenderingContextBase::ValidateFramebufferFuncParameters(
......
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