Commit 92b64929 authored by Karandeep Bhatia's avatar Karandeep Bhatia Committed by Commit Bot

IsolatedWorldCSP: Correct early return check in SetIsolatedWorldInfo.

r672618 added an early return to TestRunnerForSpecificView::SetIsolatedWorldInfo
to check for an incorrect world id. This CL corrects that check. This helps
prevent a CHECK failure when a fuzzer provides invalid input.

BUG=977801

Change-Id: I62e53fdc2854c7e8c5c6500a765af08ba12b1635
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1688255
Auto-Submit: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676169}
parent e89ca829
...@@ -627,7 +627,7 @@ void TestRunnerForSpecificView::SetIsolatedWorldInfo( ...@@ -627,7 +627,7 @@ void TestRunnerForSpecificView::SetIsolatedWorldInfo(
int world_id, int world_id,
v8::Local<v8::Value> security_origin, v8::Local<v8::Value> security_origin,
v8::Local<v8::Value> content_security_policy) { v8::Local<v8::Value> content_security_policy) {
if (world_id <= content::ISOLATED_WORLD_ID_GLOBAL && if (world_id <= content::ISOLATED_WORLD_ID_GLOBAL ||
world_id >= blink::IsolatedWorldId::kEmbedderWorldIdLimit) { world_id >= blink::IsolatedWorldId::kEmbedderWorldIdLimit) {
return; return;
} }
......
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