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

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

Issue 4997002: IE CEEE: Explicitly assign window properties/methods into the script host glo... (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 66115)
+++ ceee/ie/plugin/scripting/content_script_manager.cc (working copy)
@@ -157,6 +157,8 @@
CComPtr<IExtensionPortMessagingProvider> messaging_provider;
HRESULT hr = host_->GetExtensionPortMessagingProvider(&messaging_provider);
+ if (FAILED(hr))
Sigurður Ásgeirsson 2010/11/15 16:33:30 thanks... Can you see whether the caller logs erro
Eric Dingle 2010/11/15 16:37:51 This method is private and only called internally.
+ return hr;
hr = ContentScriptNativeApi::CreateInitialized(messaging_provider,
&native_api_);
if (FAILED(hr))
@@ -169,15 +171,19 @@
// Execute the bootstrap scripts.
hr = BootstrapScriptHost(script_host, native_api_, extension_id.c_str());
+ if (FAILED(hr))
+ return hr;
+ // Register the window object and manually make its members global.
CComPtr<IHTMLWindow2> window;
hr = document->get_parentWindow(&window);
if (FAILED(hr))
return hr;
+ hr = script_host->RegisterScriptObject(L"window", window, false);
+ if (FAILED(hr))
+ return hr;
+ hr = InvokeNamedFunction(script_host, L"ceee.initGlobals_", NULL, 0);
- // Register the window object and make its members global.
- hr = script_host->RegisterScriptObject(L"window", window, true);
-
return hr;
}
« 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