diff options
author | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 18:38:34 +0000 |
---|---|---|
committer | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 18:38:34 +0000 |
commit | 630b9deb0fe43990c2d9bf5cdc194ec46173667c (patch) | |
tree | ddf72b4a1b5b06115b61ba5eba1dfab5f054ead1 /chrome/renderer/extensions/page_capture_custom_bindings.cc | |
parent | 492077fa838f62a980a1aa1d08c7489d9f13de90 (diff) | |
download | chromium_src-630b9deb0fe43990c2d9bf5cdc194ec46173667c.zip chromium_src-630b9deb0fe43990c2d9bf5cdc194ec46173667c.tar.gz chromium_src-630b9deb0fe43990c2d9bf5cdc194ec46173667c.tar.bz2 |
Revert 186643 - Caused a 10% regression on SunSpider benchmark
BUG=180937
> Set up V8 bindings for extension/app APIs when they're first used, not on
> context creation. This should gives us a significant reduction in extension/app
> startup time and slightly better memory usage.
>
> It also gives us better error messages, the chance to complete the
> implementation of API features, and eventually the ability to expose select
> extension APIs (e.g. extension.sendMessage) to web pages.
>
> Resubmitting: changes made to resubmit this patch reviewed in: https://codereview.chromium.org/12378077/
>
> BUG=163678,120070,55316,177163
> TBR=ben@chromium.org
>
> Review URL: https://chromiumcodereview.appspot.com/11571014
TBR=cduvall@chromium.org
Review URL: https://codereview.chromium.org/12632004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions/page_capture_custom_bindings.cc')
-rw-r--r-- | chrome/renderer/extensions/page_capture_custom_bindings.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/chrome/renderer/extensions/page_capture_custom_bindings.cc b/chrome/renderer/extensions/page_capture_custom_bindings.cc index 3b684b9..c7e41ea 100644 --- a/chrome/renderer/extensions/page_capture_custom_bindings.cc +++ b/chrome/renderer/extensions/page_capture_custom_bindings.cc @@ -13,10 +13,8 @@ namespace extensions { -PageCaptureCustomBindings::PageCaptureCustomBindings( - Dispatcher* dispatcher, - v8::Handle<v8::Context> context) - : ChromeV8Extension(dispatcher, context) { +PageCaptureCustomBindings::PageCaptureCustomBindings() + : ChromeV8Extension(NULL) { RouteStaticFunction("CreateBlob", &CreateBlob); RouteStaticFunction("SendResponseAck", &SendResponseAck); } @@ -39,9 +37,7 @@ v8::Handle<v8::Value> PageCaptureCustomBindings::SendResponseAck( CHECK(args.Length() == 1); CHECK(args[0]->IsInt32()); - PageCaptureCustomBindings* self = - GetFromArguments<PageCaptureCustomBindings>(args); - content::RenderView* render_view = self->GetRenderView(); + content::RenderView* render_view = GetCurrentRenderView(); if (render_view) { render_view->Send(new ExtensionHostMsg_ResponseAck( render_view->GetRoutingID(), args[0]->Int32Value())); |