Merge lp:~abreu-alexandre/oxide/fix-crash-scroll-message-handler into lp:~oxide-developers/oxide/oxide.trunk

Proposed by Alexandre Abreu
Status: Needs review
Proposed branch: lp:~abreu-alexandre/oxide/fix-crash-scroll-message-handler
Merge into: lp:~oxide-developers/oxide/oxide.trunk
Diff against target: 16 lines (+6/-0)
1 file modified
shared/browser/oxide_script_message_contents_helper.cc (+6/-0)
To merge this branch: bzr merge lp:~abreu-alexandre/oxide/fix-crash-scroll-message-handler
Reviewer Review Type Date Requested Status
Chris Coulson Needs Fixing
Review via email: mp+292321@code.launchpad.net

Commit message

Fix a crash caused by a race if a message is being sent as the corresponding webcontents is being destroyed.

Description of the change

Fix a crash caused by a race if a message is being sent as the corresponding webcontents is being destroyed.

To post a comment you must log in.
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

This looks ok, but it needs a test (and rebasing on to the git branch)

review: Needs Fixing

Unmerged revisions

1449. By Alexandre Abreu

draft fix

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'shared/browser/oxide_script_message_contents_helper.cc'
--- shared/browser/oxide_script_message_contents_helper.cc 2015-10-07 09:44:33 +0000
+++ shared/browser/oxide_script_message_contents_helper.cc 2016-04-19 20:37:04 +0000
@@ -121,6 +121,12 @@
121 &params.wrapped_payload));121 &params.wrapped_payload));
122 WebFrame* target = frame;122 WebFrame* target = frame;
123 WebView* view = frame->GetView();123 WebView* view = frame->GetView();
124 if (!view) {
125 ReturnError(render_frame_host,
126 ScriptMessageParams::ERROR_NO_HANDLER,
127 params);
128 return;
129 }
124130
125 while (target) {131 while (target) {
126 DCHECK_EQ(target->GetView(), view);132 DCHECK_EQ(target->GetView(), view);

Subscribers

People subscribed via source and target branches