Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4349)

Unified Diff: ceee/ie/plugin/scripting/content_script_manager.cc

Issue 5133002: IE CEEE: Add another layer of isolation to content scripts execution through ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ceee/ie/plugin/scripting/content_script_manager.cc
===================================================================
--- ceee/ie/plugin/scripting/content_script_manager.cc (revision 66423)
+++ ceee/ie/plugin/scripting/content_script_manager.cc (working copy)
@@ -174,12 +174,13 @@
if (FAILED(hr))
return hr;
- // Register the window object and manually make its members global.
+ // Register the window object and initialize the global namespace of the
+ // script host.
CComPtr<IHTMLWindow2> window;
hr = document->get_parentWindow(&window);
if (FAILED(hr))
return hr;
- hr = script_host->RegisterScriptObject(L"window", window, false);
+ hr = script_host->RegisterScriptObject(L"unsafeWindow", window, false);
if (FAILED(hr))
return hr;
hr = InvokeNamedFunction(script_host, L"ceee.initGlobals_", NULL, 0);
« no previous file with comments | « ceee/ie/plugin/scripting/ceee_bootstrap.js ('k') | ceee/ie/plugin/scripting/content_script_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698