Commit 7ecabc00 authored by Karandeep Bhatia's avatar Karandeep Bhatia Committed by Commit Bot

Replace domWindow with GetExecutionContext in TextTrackLoader.

Document::domWindow() can be null when a Document is constructed without
a browsing context. To prevent this possible derference, use
Document::GetExecutionContext which is guaranteed to be non-null.

BUG=1116743

Change-Id: Ib679e9689692f6b24a046ba43a17e16b2db858f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2360493
Auto-Submit: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799154}
parent b2ae052e
......@@ -108,7 +108,8 @@ bool TextTrackLoader::Load(const KURL& url,
CrossOriginAttributeValue cross_origin) {
CancelLoad();
ResourceLoaderOptions options(GetDocument().domWindow()->GetCurrentWorld());
ResourceLoaderOptions options(
GetDocument().GetExecutionContext()->GetCurrentWorld());
options.initiator_info.name = fetch_initiator_type_names::kTrack;
// Let |request| be the result of creating a potential-CORS request
......
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