Commit 87f0849d authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[v8] Fix inline script check

Inline scripts start in the middle of some HTML, and so their start
position is non-zero.

Bug: chromium:582873
Change-Id: I8c5aa2e62c69067e45baad5fc7bd3c46b4097e96
Reviewed-on: https://chromium-review.googlesource.com/743982Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512512}
parent dc1376ec
......@@ -555,8 +555,8 @@ v8::MaybeLocal<v8::Script> V8ScriptRunner::CompileScript(
V8CompileHistogram::Cacheability cacheability_if_no_handler =
V8CompileHistogram::Cacheability::kNoncacheable;
if (!cache_handler && (script_start_position.line_.ZeroBasedInt() == 0) &&
(script_start_position.column_.ZeroBasedInt() == 0))
if (!cache_handler && (script_start_position.line_.ZeroBasedInt() != 0 ||
script_start_position.column_.ZeroBasedInt() != 0))
cacheability_if_no_handler =
V8CompileHistogram::Cacheability::kInlineScript;
......
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