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

Side by Side Diff: chrome/browser/ui/aura/accessibility/automation_manager_aura.cc

Issue 2893473002: cros: AutomationManagerAura::SendEvent crash fix (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" 5 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return; 141 return;
142 } 142 }
143 143
144 if (processing_events_) { 144 if (processing_events_) {
145 pending_events_.push_back(std::make_pair(aura_obj, event_type)); 145 pending_events_.push_back(std::make_pair(aura_obj, event_type));
146 return; 146 return;
147 } 147 }
148 processing_events_ = true; 148 processing_events_ = true;
149 149
150 ExtensionMsg_AccessibilityEventParams params; 150 ExtensionMsg_AccessibilityEventParams params;
151 if (!current_tree_serializer_->SerializeChanges(aura_obj, &params.update)) { 151 if (!current_tree_serializer_ ||
dmazzoni 2017/05/17 05:13:01 Thanks for debugging! Looks like SendEvent was bei
Qiang(Joe) Xu 2017/05/17 05:36:17 Done.
152 !current_tree_serializer_->SerializeChanges(aura_obj, &params.update)) {
152 LOG(ERROR) << "Unable to serialize one accessibility event."; 153 LOG(ERROR) << "Unable to serialize one accessibility event.";
153 return; 154 return;
154 } 155 }
155 156
156 // Make sure the focused node is serialized. 157 // Make sure the focused node is serialized.
157 views::AXAuraObjWrapper* focus = 158 views::AXAuraObjWrapper* focus =
158 views::AXAuraObjCache::GetInstance()->GetFocus(); 159 views::AXAuraObjCache::GetInstance()->GetFocus();
159 if (focus) 160 if (focus)
160 current_tree_serializer_->SerializeChanges(focus, &params.update); 161 current_tree_serializer_->SerializeChanges(focus, &params.update);
161 162
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 226 }
226 } 227 }
227 228
228 // Otherwise, fire the event directly on the Window. 229 // Otherwise, fire the event directly on the Window.
229 views::AXAuraObjWrapper* window_wrapper = 230 views::AXAuraObjWrapper* window_wrapper =
230 views::AXAuraObjCache::GetInstance()->GetOrCreate(window); 231 views::AXAuraObjCache::GetInstance()->GetOrCreate(window);
231 if (window_wrapper) 232 if (window_wrapper)
232 SendEvent(nullptr, window_wrapper, action.hit_test_event_to_fire); 233 SendEvent(nullptr, window_wrapper, action.hit_test_event_to_fire);
233 #endif 234 #endif
234 } 235 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698