 Chromium Code Reviews
 Chromium Code Reviews Issue 4997002:
  IE CEEE: Explicitly assign window properties/methods into the script host glo...  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src/
    
  
    Issue 4997002:
  IE CEEE: Explicitly assign window properties/methods into the script host glo...  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src/| 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; | 
| } |