Merge lp:~abreu-alexandre/oxide/fix-unloads-crash into lp:~oxide-developers/oxide/oxide.trunk

Proposed by Alexandre Abreu on 2015-05-15
Status: Superseded
Proposed branch: lp:~abreu-alexandre/oxide/fix-unloads-crash
Merge into: lp:~oxide-developers/oxide/oxide.trunk
Diff against target: 158 lines (+72/-1) (has conflicts)
6 files modified
CHROMIUM_VERSION (+4/-0)
patches/enable-accelerated-canvas-on-arale.patch (+4/-0)
qt/VERSION (+4/-0)
shared/browser/oxide_browser_process_main.cc (+6/-0)
shared/browser/oxide_web_contents_unloader.cc (+36/-1)
shared/browser/oxide_web_view.cc (+18/-0)
Text conflict in CHROMIUM_VERSION
Text conflict in patches/enable-accelerated-canvas-on-arale.patch
Text conflict in qt/VERSION
Text conflict in shared/browser/oxide_web_contents_unloader.cc
Text conflict in shared/browser/oxide_web_view.cc
To merge this branch: bzr merge lp:~abreu-alexandre/oxide/fix-unloads-crash
Reviewer Review Type Date Requested Status
Chris Coulson 2015-05-15 Pending
Review via email: mp+259191@code.launchpad.net

This proposal has been superseded by a proposal from 2015-05-15.

Commit message

Fix premature web contents ptr release

Description of the change

Fix premature web contents ptr release

To post a comment you must log in.

Unmerged revisions

1061. By Alexandre Abreu on 2015-05-15

Fix early web contents ptr release

1060. By Alexandre Abreu on 2015-05-13

Fix race in web contents unloads that can be triggered when the renderer dies as the contents unload has started

1059. By Chris Coulson on 2015-05-08

Bump Chromium rev to 43.0.2357.52

1058. By Chris Coulson on 2015-04-30

Automatically bump qt revision to 1.7.8

1057. By Olivier Tilloy on 2015-04-30

Fix a crash when a JS dialog is dismissed twice (by calling accept() and then reject() on it).

1056. By Olivier Tilloy on 2015-04-30

Fix a crash when a popup menu is dismissed twice (by calling accept() and then cancel() on it).

1055. By Chris Coulson on 2015-04-30

Bump Chromium rev to 43.0.2357.45

1054. By Chris Coulson on 2015-04-29

Automatically bump qt revision to 1.7.7

1053. By Chris Coulson on 2015-04-29

Don't crash when the frame tree is torn down during a process swap

1052. By Chris Coulson on 2015-04-29

Automatically bump qt revision to 1.7.6

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CHROMIUM_VERSION'
2--- CHROMIUM_VERSION 2015-05-05 19:10:05 +0000
3+++ CHROMIUM_VERSION 2015-05-15 01:52:36 +0000
4@@ -1,1 +1,5 @@
5+<<<<<<< TREE
6 44.0.2391.0
7+=======
8+43.0.2357.52
9+>>>>>>> MERGE-SOURCE
10
11=== modified file 'patches/enable-accelerated-canvas-on-arale.patch'
12--- patches/enable-accelerated-canvas-on-arale.patch 2015-05-04 11:31:03 +0000
13+++ patches/enable-accelerated-canvas-on-arale.patch 2015-05-15 01:52:36 +0000
14@@ -4,7 +4,11 @@
15 diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
16 --- a/gpu/config/software_rendering_list_json.cc
17 +++ b/gpu/config/software_rendering_list_json.cc
18+<<<<<<< TREE
19 @@ -1096,29 +1096,16 @@ LONG_STRING_CONST(
20+=======
21+@@ -1182,29 +1182,16 @@ LONG_STRING_CONST(
22+>>>>>>> MERGE-SOURCE
23 },
24 "vendor_id": "0x8086",
25 "device_id": ["0x2a02"],
26
27=== modified file 'qt/VERSION'
28--- qt/VERSION 2015-04-07 11:04:04 +0000
29+++ qt/VERSION 2015-05-15 01:52:36 +0000
30@@ -1,3 +1,7 @@
31 MAJOR=1
32+<<<<<<< TREE
33 MINOR=8
34 PATCH=0
35+=======
36+MINOR=7
37+PATCH=8>>>>>>> MERGE-SOURCE
38
39=== modified file 'shared/browser/oxide_browser_process_main.cc'
40--- shared/browser/oxide_browser_process_main.cc 2015-05-11 14:47:21 +0000
41+++ shared/browser/oxide_browser_process_main.cc 2015-05-15 01:52:36 +0000
42@@ -242,6 +242,9 @@
43 // Remove this when we implement a selection API (see bug #1324292)
44 command_line->AppendSwitch(switches::kDisableTouchEditing);
45
46+ // See https://launchpad.net/bugs/1442413
47+ command_line->AppendSwitch("disable-mojo-channel");
48+
49 if (gl_impl == gfx::kGLImplementationNone ||
50 IsEnvironmentOptionEnabled("DISABLE_GPU")) {
51 command_line->AppendSwitch(switches::kDisableGpu);
52@@ -267,6 +270,9 @@
53 if (IsEnvironmentOptionEnabled("NO_SANDBOX")) {
54 command_line->AppendSwitch(switches::kNoSandbox);
55 } else {
56+ // See https://launchpad.net/bugs/1447311
57+ command_line->AppendSwitch(switches::kDisableNamespaceSandbox);
58+
59 if (IsEnvironmentOptionEnabled("DISABLE_SETUID_SANDBOX")) {
60 command_line->AppendSwitch(switches::kDisableSetuidSandbox);
61 }
62
63=== modified file 'shared/browser/oxide_web_contents_unloader.cc'
64--- shared/browser/oxide_web_contents_unloader.cc 2015-05-13 21:53:33 +0000
65+++ shared/browser/oxide_web_contents_unloader.cc 2015-05-15 01:52:36 +0000
66@@ -23,8 +23,35 @@
67 #include "base/memory/singleton.h"
68 #include "base/message_loop/message_loop.h"
69 #include "base/run_loop.h"
70+<<<<<<< TREE
71+=======
72+#include "base/supports_user_data.h"
73+#include "content/public/browser/render_view_host.h"
74+>>>>>>> MERGE-SOURCE
75 #include "content/public/browser/web_contents.h"
76-#include "content/public/browser/web_contents_observer.h"
77+<<<<<<< TREE
78+#include "content/public/browser/web_contents_observer.h"
79+=======
80+#include "content/public/browser/web_contents_observer.h"
81+
82+
83+class WebContentsUnloaderObserver : public content::WebContentsObserver,
84+ public base::SupportsUserData::Data {
85+public:
86+ explicit WebContentsUnloaderObserver(
87+ content::WebContents* contents)
88+ : content::WebContentsObserver(contents) {}
89+ virtual ~WebContentsUnloaderObserver() {}
90+
91+ void RenderProcessGone(base::TerminationStatus status) override {
92+ web_contents()->GetDelegate()->CloseContents(web_contents());
93+ }
94+};
95+
96+namespace {
97+const char kWebContentsUnloaderObserverKey[] = "oxide_web_contents_unloader_observer_data";
98+}
99+>>>>>>> MERGE-SOURCE
100
101 namespace oxide {
102
103@@ -80,9 +107,17 @@
104 return;
105 }
106
107+<<<<<<< TREE
108 // To intercept render process crashes
109 new WebContentsUnloaderObserver(contents.get());
110
111+=======
112+ content::WebContents* wc = contents.get();
113+ wc->SetUserData(
114+ kWebContentsUnloaderObserverKey,
115+ new WebContentsUnloaderObserver(wc));
116+
117+>>>>>>> MERGE-SOURCE
118 // So we can intercept CloseContents
119 contents->SetDelegate(this);
120
121
122=== modified file 'shared/browser/oxide_web_view.cc'
123--- shared/browser/oxide_web_view.cc 2015-05-14 15:37:57 +0000
124+++ shared/browser/oxide_web_view.cc 2015-05-15 01:52:36 +0000
125@@ -1050,6 +1050,7 @@
126
127 void WebView::FrameDeleted(content::RenderFrameHost* render_frame_host) {
128 WebFrame* frame = WebFrame::FromRenderFrameHost(render_frame_host);
129+<<<<<<< TREE
130 if (!frame) {
131 // When a frame is detached, we get notified before any of its children
132 // are detached. If we hit this case, it means that this is a child of a
133@@ -1072,6 +1073,23 @@
134 frames.pop();
135 }
136
137+=======
138+ if (!frame) {
139+ // When a frame is detached, we get notified before any of its children
140+ // are detached. If we hit this case, it means that this is a child of a
141+ // frame that's being detached, and we've already deleted the corresponding
142+ // WebFrame
143+ return;
144+ }
145+
146+ // This is a bit of a hack, but we need to process children now - see the
147+ // comment above
148+ for (size_t i = 0; i < frame->GetChildCount(); ++i) {
149+ certificate_error_manager_.FrameDetached(frame->GetChildAt(i));
150+ }
151+
152+ certificate_error_manager_.FrameDetached(frame);
153+>>>>>>> MERGE-SOURCE
154 WebFrame::Destroy(frame);
155 }
156
157
158=== modified file 'shared/shared.gyp'

Subscribers

People subscribed via source and target branches