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

Side by Side Diff: content/shell/renderer/test_runner/accessibility_controller.cc

Issue 1073533002: OOPIF: Don't crash when running layout tests that have an OOP iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « content/shell/renderer/layout_test/webkit_test_runner.cc ('k') | 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 "content/shell/renderer/test_runner/accessibility_controller.h" 5 #include "content/shell/renderer/test_runner/accessibility_controller.h"
6 6
7 #include "gin/handle.h" 7 #include "gin/handle.h"
8 #include "gin/object_template_builder.h" 8 #include "gin/object_template_builder.h"
9 #include "gin/wrappable.h" 9 #include "gin/wrappable.h"
10 #include "third_party/WebKit/public/web/WebElement.h" 10 #include "third_party/WebKit/public/web/WebElement.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool AccessibilityController::ShouldLogAccessibilityEvents() { 161 bool AccessibilityController::ShouldLogAccessibilityEvents() {
162 return log_accessibility_events_; 162 return log_accessibility_events_;
163 } 163 }
164 164
165 void AccessibilityController::NotificationReceived( 165 void AccessibilityController::NotificationReceived(
166 const blink::WebAXObject& target, const std::string& notification_name) { 166 const blink::WebAXObject& target, const std::string& notification_name) {
167 v8::Isolate* isolate = blink::mainThreadIsolate(); 167 v8::Isolate* isolate = blink::mainThreadIsolate();
168 v8::HandleScope handle_scope(isolate); 168 v8::HandleScope handle_scope(isolate);
169 169
170 blink::WebFrame* frame = web_view_->mainFrame(); 170 blink::WebFrame* frame = web_view_->mainFrame();
171 if (!frame) 171 if (!frame || frame->isWebRemoteFrame())
172 return; 172 return;
173 173
174 v8::Handle<v8::Context> context = frame->mainWorldScriptContext(); 174 v8::Handle<v8::Context> context = frame->mainWorldScriptContext();
175 if (context.IsEmpty()) 175 if (context.IsEmpty())
176 return; 176 return;
177 177
178 v8::Context::Scope context_scope(context); 178 v8::Context::Scope context_scope(context);
179 179
180 // Call notification listeners on the element. 180 // Call notification listeners on the element.
181 v8::Handle<v8::Object> element_handle = elements_.GetOrCreate(target); 181 v8::Handle<v8::Object> element_handle = elements_.GetOrCreate(target);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 v8::Handle<v8::Object> result = 269 v8::Handle<v8::Object> result =
270 FindAccessibleElementByIdRecursive(obj.childAt(i), id); 270 FindAccessibleElementByIdRecursive(obj.childAt(i), id);
271 if (*result) 271 if (*result)
272 return result; 272 return result;
273 } 273 }
274 274
275 return v8::Handle<v8::Object>(); 275 return v8::Handle<v8::Object>();
276 } 276 }
277 277
278 } // namespace content 278 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/webkit_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698