Commit 78dfce9d authored by Zain Afzal's avatar Zain Afzal Committed by Commit Bot

Removed chooseFileSystemEntries from window to prevent SecurityError being thrown

BUG=chromium:1040328

Change-Id: I8654ad18ce083e75dc52a46279f914436010ae9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1990888
Commit-Queue: Zain Afzal <zafzal@google.com>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#729642}
parent 3a5f4856
...@@ -50,4 +50,12 @@ function receiveMessage(/** Event */ e) { ...@@ -50,4 +50,12 @@ function receiveMessage(/** Event */ e) {
} }
} }
// Attempting to execute chooseFileSystemEntries is guaranteed to result in a
// SecurityError due to the fact that we are running in a unprivileged iframe.
// Note, we can not do window.chooseFileSystemEntries due to the fact that
// closure does not yet know that 'chooseFileSystemEntries' is on the window.
// TODO(crbug/1040328): Remove this when we have a polyfill that allows us to
// talk to the privileged frame.
window['chooseFileSystemEntries'] = null;
window.addEventListener('message', receiveMessage, false); window.addEventListener('message', receiveMessage, false);
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