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

Issue 569233002: Refactoring the order of the weak_ptr_factory in chrome/renderer folder (Closed)

Created:
6 years, 3 months ago by MRV
Modified:
6 years, 3 months ago
Reviewers:
sky
CC:
chromium-reviews, hclam+watch_chromium.org, imcheng+watch_chromium.org, extensions-reviews_chromium.org, hguihot+watch_chromium.org, jasonroberts+watch_google.com, avayvod+watch_chromium.org, pwestin+watch_google.com, feature-media-reviews_chromium.org, chromium-apps-reviews_chromium.org, miu+watch_chromium.org, hubbe+watch_chromium.org, mikhal+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Refactoring the order of the weak_ptr_factory in chrome/renderer folder Changing in the intialization order of WeakPtrFactory such that all member variables should appear before the WeakPtrFactory to ensure that any WeakPtrs to Controller are invalidated before its members variable's destructors are executed, rendering them invalid. BUG=303818 Committed: https://crrev.com/352bb45047c1fce4203fe9893893f2fbf352d716 Cr-Commit-Position: refs/heads/master@{#294861}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -9 lines) Patch
M chrome/renderer/extensions/cast_streaming_native_handler.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/printing/print_web_view_helper.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/renderer/translate/translate_helper.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/translate/translate_helper.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
MRV
PTAL
6 years, 3 months ago (2014-09-15 13:49:16 UTC) #2
sky
LGTM - I'll also say unless you add a presubmit check for this, it'll keep ...
6 years, 3 months ago (2014-09-15 16:13:11 UTC) #3
MRV
On 2014/09/15 16:13:11, sky wrote: > LGTM - I'll also say unless you add a ...
6 years, 3 months ago (2014-09-15 17:05:04 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/569233002/1
6 years, 3 months ago (2014-09-15 17:18:29 UTC) #6
commit-bot: I haz the power
Failed to commit the patch.
6 years, 3 months ago (2014-09-15 19:12:01 UTC) #8
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/352bb45047c1fce4203fe9893893f2fbf352d716 Cr-Commit-Position: refs/heads/master@{#294861}
6 years, 3 months ago (2014-09-15 19:14:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/569233002/1
6 years, 3 months ago (2014-09-16 02:19:04 UTC) #11
commit-bot: I haz the power
6 years, 3 months ago (2014-09-16 02:21:57 UTC) #13
Failed to apply patch for
chrome/renderer/extensions/cast_streaming_native_handler.h:
While running git apply --index -p1;
  error: patch failed:
chrome/renderer/extensions/cast_streaming_native_handler.h:85
  error: chrome/renderer/extensions/cast_streaming_native_handler.h: patch does
not apply

Patch:       chrome/renderer/extensions/cast_streaming_native_handler.h
Index: chrome/renderer/extensions/cast_streaming_native_handler.h
diff --git a/chrome/renderer/extensions/cast_streaming_native_handler.h
b/chrome/renderer/extensions/cast_streaming_native_handler.h
index
ee0626d62a6a4566e40f0d2d95b64068c0a31f2d..92e76a107339e7c486d4aabda31d5fa94413af49
100644
--- a/chrome/renderer/extensions/cast_streaming_native_handler.h
+++ b/chrome/renderer/extensions/cast_streaming_native_handler.h
@@ -85,8 +85,6 @@ class CastStreamingNativeHandler : public
ObjectBackedNativeHandler {
   typedef std::map<int, linked_ptr<CastUdpTransport> > UdpTransportMap;
   UdpTransportMap udp_transport_map_;
 
-  base::WeakPtrFactory<CastStreamingNativeHandler> weak_factory_;
-
   extensions::ScopedPersistent<v8::Function> create_callback_;
 
   typedef std::map<int,
@@ -95,6 +93,8 @@ class CastStreamingNativeHandler : public
ObjectBackedNativeHandler {
   RtpStreamCallbackMap get_raw_events_callbacks_;
   RtpStreamCallbackMap get_stats_callbacks_;
 
+  base::WeakPtrFactory<CastStreamingNativeHandler> weak_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler);
 };

Powered by Google App Engine
This is Rietveld 408576698