diff options
Diffstat (limited to 'chrome/renderer/extensions/renderer_extension_bindings.cc')
-rw-r--r-- | chrome/renderer/extensions/renderer_extension_bindings.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/renderer/extensions/renderer_extension_bindings.cc b/chrome/renderer/extensions/renderer_extension_bindings.cc index 4d894a4..86d3d15 100644 --- a/chrome/renderer/extensions/renderer_extension_bindings.cc +++ b/chrome/renderer/extensions/renderer_extension_bindings.cc @@ -49,7 +49,9 @@ class ExtensionImpl : public v8::Extension { // Creates a new messaging channel to the given extension. static v8::Handle<v8::Value> OpenChannelToExtension( const v8::Arguments& args) { - RenderView* renderview = GetActiveRenderView(); + // Get the current RenderView so that we can send a routed IPC message from + // the correct source. + RenderView* renderview = GetRenderViewForCurrentContext(); if (!renderview) return v8::Undefined(); @@ -65,7 +67,7 @@ class ExtensionImpl : public v8::Extension { // Sends a message along the given channel. static v8::Handle<v8::Value> PostMessage(const v8::Arguments& args) { - RenderView* renderview = GetActiveRenderView(); + RenderView* renderview = GetRenderViewForCurrentContext(); if (!renderview) return v8::Undefined(); |