| Index: chrome/renderer/extensions/miscellaneous_bindings.cc
|
| diff --git a/chrome/renderer/extensions/miscellaneous_bindings.cc b/chrome/renderer/extensions/miscellaneous_bindings.cc
|
| index facdec740dc724cd417fa73cbf92a10db3cac9a6..35d24bd4ffc3af735bbf6ed5bcb6313834d0a80c 100644
|
| --- a/chrome/renderer/extensions/miscellaneous_bindings.cc
|
| +++ b/chrome/renderer/extensions/miscellaneous_bindings.cc
|
| @@ -65,8 +65,9 @@ const char kPortClosedError[] = "Attempting to use a disconnected port object";
|
|
|
| class ExtensionImpl : public extensions::ChromeV8Extension {
|
| public:
|
| - explicit ExtensionImpl(extensions::Dispatcher* dispatcher)
|
| - : extensions::ChromeV8Extension(dispatcher) {
|
| + explicit ExtensionImpl(extensions::Dispatcher* dispatcher,
|
| + v8::Handle<v8::Context> context)
|
| + : extensions::ChromeV8Extension(dispatcher, context) {
|
| RouteStaticFunction("CloseChannel", &CloseChannel);
|
| RouteStaticFunction("PortAddRef", &PortAddRef);
|
| RouteStaticFunction("PortRelease", &PortRelease);
|
| @@ -78,7 +79,8 @@ class ExtensionImpl : public extensions::ChromeV8Extension {
|
|
|
| // Sends a message along the given channel.
|
| static v8::Handle<v8::Value> PostMessage(const v8::Arguments& args) {
|
| - content::RenderView* renderview = GetCurrentRenderView();
|
| + ExtensionImpl* self = GetFromArguments<ExtensionImpl>(args);
|
| + content::RenderView* renderview = self->GetRenderView();
|
| if (!renderview)
|
| return v8::Undefined();
|
|
|
| @@ -178,8 +180,10 @@ class ExtensionImpl : public extensions::ChromeV8Extension {
|
|
|
| namespace extensions {
|
|
|
| -ChromeV8Extension* MiscellaneousBindings::Get(Dispatcher* dispatcher) {
|
| - return new ExtensionImpl(dispatcher);
|
| +ChromeV8Extension* MiscellaneousBindings::Get(
|
| + Dispatcher* dispatcher,
|
| + v8::Handle<v8::Context> context) {
|
| + return new ExtensionImpl(dispatcher, context);
|
| }
|
|
|
| // static
|
|
|