angler-fishThe Vulnerability History Project

Revert of Fix extension bindings injection for iframes (patchset #5 id:120001 of https://codereview.chromium.org/2151693002/ )

      Reason for revert:
This Cl caused a test failure under DrMemory.

First build with failing test: https://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Browser%20%28DrMemory%20full%29%20%282%29/builds/3969

Sample failure output: FramesExtensionBindingsApiTest.FramesBeforeNavigation:

[1420:4432:0722/173632:WARNING:chrome_browser_main_win.cc(419)] Command line too long for RegisterApplicationRestart

[1420:4432:0722/174006:INFO:CONSOLE(0)] &quotDenying load of chrome-extension://ficgdghpakbhhkmdjamiedmcoobamkoo/nonexistent.html. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.&quot, source: about:blank (0)

[1420:4432:0722/174015:INFO:CONSOLE(24)] &quotcaught exception: SecurityError: Blocked a frame with origin &quothttp://127.0.0.1:50285&quot from accessing a cross-origin frame.&quot, source: http://127.0.0.1:50285/extensions/api_test/bindings/frames_before_navigation.html (24)

[1420:4432:0722/174018:INFO:CONSOLE(0)] &quotDenying load of chrome-extension://ficgdghpakbhhkmdjamiedmcoobamkoo/nonexistent.html. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.&quot, source: about:blank (0)

[1420:4988:0722/174053:WARNING:embedded_test_server.cc(193)] Request not handled. Returning 404: /favicon.ico

c:\b\build\slave\drm-cr\build\src\chrome\browser\extensions\extension_bindings_apitest.cc(257): error: Value of: page_success

Actual: false

Expected: true

Original issue's description:
> Fix extension bindings injection for iframes
>
> For iframes, we don't want to use the source url for determining the
> associated extension because it starts out with an about:blank context
> that is scriptable by its parent.
>
> BUG=573131
>
> Committed: https://crrev.com/91f655b19888da3f86b57ad8c548d
    
commit 4b8ca0a9fbbe79fa5a7819917e5a31d237f0f499
+61
+32
+11
+64
+7
+13
+5
+1 -1
+15 -2
expand_less