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

Unified Diff: chrome/renderer/printing/print_web_view_helper.cc

Issue 795943002: Fix WeakPtrFactory member ordering in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding more changes Created 6 years 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/printing/print_web_view_helper.cc
diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc
index 201e4c25cfc9c3bcd65485912053db37fa698538..892505fe344c908c7475e28034ba4cc838712b21 100644
--- a/chrome/renderer/printing/print_web_view_helper.cc
+++ b/chrome/renderer/printing/print_web_view_helper.cc
@@ -607,8 +607,6 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
void RestoreSize();
void CopySelection(const WebPreferences& preferences);
- base::WeakPtrFactory<PrepareFrameAndViewForPrint> weak_ptr_factory_;
-
FrameReference frame_;
blink::WebNode node_to_print_;
bool owns_web_view_;
@@ -621,6 +619,8 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
bool should_print_selection_only_;
bool is_printing_started_;
+ base::WeakPtrFactory<PrepareFrameAndViewForPrint> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PrepareFrameAndViewForPrint);
};
@@ -629,14 +629,14 @@ PrepareFrameAndViewForPrint::PrepareFrameAndViewForPrint(
blink::WebLocalFrame* frame,
const blink::WebNode& node,
bool ignore_css_margins)
- : weak_ptr_factory_(this),
- frame_(frame),
+ : frame_(frame),
node_to_print_(node),
owns_web_view_(false),
expected_pages_count_(0),
should_print_backgrounds_(params.should_print_backgrounds),
should_print_selection_only_(params.selection_only),
- is_printing_started_(false) {
+ is_printing_started_(false),
+ weak_ptr_factory_(this) {
PrintMsg_Print_Params print_params = params;
if (!should_print_selection_only_ ||
!PrintingNodeOrPdfFrame(frame, node_to_print_)) {
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698