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

Unified Diff: chrome/renderer/extensions/content_watcher.cc

Issue 12632004: Revert 186643 - Caused a 10% regression on SunSpider benchmark (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 months 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: chrome/renderer/extensions/content_watcher.cc
===================================================================
--- chrome/renderer/extensions/content_watcher.cc (revision 186747)
+++ chrome/renderer/extensions/content_watcher.cc (working copy)
@@ -16,13 +16,11 @@
namespace extensions {
namespace {
-
class MutationHandler : public ChromeV8Extension {
public:
explicit MutationHandler(Dispatcher* dispatcher,
- v8::Handle<v8::Context> v8_context,
base::WeakPtr<ContentWatcher> content_watcher)
- : ChromeV8Extension(dispatcher, v8_context),
+ : ChromeV8Extension(dispatcher),
content_watcher_(content_watcher) {
RouteFunction("FrameMutated",
base::Bind(&MutationHandler::FrameMutated,
@@ -33,7 +31,7 @@
v8::Handle<v8::Value> FrameMutated(const v8::Arguments& args) {
if (content_watcher_) {
content_watcher_->ScanAndNotify(
- WebKit::WebFrame::frameForContext(v8_context()));
+ WebKit::WebFrame::frameForCurrentContext());
}
return v8::Undefined();
}
@@ -48,10 +46,9 @@
dispatcher_(dispatcher) {}
ContentWatcher::~ContentWatcher() {}
-scoped_ptr<NativeHandler> ContentWatcher::MakeNatives(
- v8::Handle<v8::Context> v8_context) {
- return scoped_ptr<NativeHandler>(new MutationHandler(
- dispatcher_, v8_context, weak_ptr_factory_.GetWeakPtr()));
+scoped_ptr<NativeHandler> ContentWatcher::MakeNatives() {
+ return scoped_ptr<NativeHandler>(
+ new MutationHandler(dispatcher_, weak_ptr_factory_.GetWeakPtr()));
}
void ContentWatcher::OnWatchPages(
« no previous file with comments | « chrome/renderer/extensions/content_watcher.h ('k') | chrome/renderer/extensions/context_menus_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698