Commit 489161a5 authored by Alex Ilin's avatar Alex Ilin Committed by Commit Bot

[identity] getAuthToken(): inject JS bridge earlier

Sometimes OAuthConsent.setConsentResult() JS Bridge is called by the
server before it has been initialized by the injected JavaScript, so the
browser doesn’t receive the consent result.

This CL makes Chrome inject JS bridge as early as possible, after the
navigation commit.

Fixed: 1075932
Change-Id: I4030163cd51b8af6be785be577412b2d5f077687
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2169910Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763432}
parent 94716308
......@@ -44,6 +44,8 @@ function loadAuthUrlAndShowWindow(url, win) {
windowId = win.id;
windowShown = true;
}
});
webview.addEventListener('loadcommit', function() {
webview.executeScript({file: 'inject.js'});
});
}
......
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