Commit f369e8a1 authored by Albert Chaulk's avatar Albert Chaulk Committed by Commit Bot

Change CHECK to return false

This branch is suddenly getting hit, which should never happen, but
misbehaving js is better than a browser crash

Test: None
Bug: 138416788
Change-Id: I3f81ac019b2d0b361bf390f0a1dfce1555a0e392
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730794
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Reviewed-by: default avatarDaniel Nicoara <dnicoara@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683239}
parent 14ca764f
...@@ -762,8 +762,12 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() { ...@@ -762,8 +762,12 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage(std::string* error) { bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage(std::string* error) {
const CastWebContents* webview = GetWebViewForTab(execute_tab_id_); const CastWebContents* webview = GetWebViewForTab(execute_tab_id_);
if (!webview) {
*error = ErrorUtils::FormatErrorMessage(
keys::kTabIndexNotFoundError, base::NumberToString(execute_tab_id_));
return false;
}
CHECK(webview);
content::WebContents* contents = webview->web_contents(); content::WebContents* contents = webview->web_contents();
int frame_id = details_->frame_id ? *details_->frame_id int frame_id = details_->frame_id ? *details_->frame_id
......
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