blob_storage_controller.cc assert from this bug was caused by the fact that worker thread actually run in a different renderer process from the main page JS thread. chrome.fileBrowserPrivate.* methods grant access to files through ChildProcessSecurityPolicy class, but such file permissions would end up associated with renderer process of the main thread only. When worker tries to register blobs representing such files, ChildProcessSecurityPolicy check would reject it since its client process id has nothing to do with main renderer's id.
This CL adds mapping between worker and main renderer processes and uses that to ensure that worker thread renderer process file permissions are "inherited" from its main JS thread renderer child process.
BUG=chromium-os:14680
TEST=added extra tests to ChildProcessSecurityPolicyTest.FilePermissions
Review URL: http://codereview.chromium.org/6893145
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83754 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed