Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 0294c711802aa6a8899049aa97388cb6303f9dcb..8f30ff0360af5fbcf0801955cd4c3625582e8db8 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -3654,18 +3654,11 @@ void RenderViewImpl::didClearWindowObject(WebFrame* frame, int world_id) { |
FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
DidClearWindowObject(frame, world_id)); |
- if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) { |
- if (!dom_automation_controller_) |
- dom_automation_controller_.reset(new DomAutomationController()); |
- dom_automation_controller_->set_message_sender( |
- static_cast<RenderView*>(this)); |
- dom_automation_controller_->set_routing_id(routing_id()); |
- dom_automation_controller_->BindToJavascript(frame, |
- "domAutomationController"); |
- } |
- |
- if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) |
- StatsCollectionController::Install(frame); |
+ if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION && world_id == 0) |
Mike West
2014/01/13 11:41:35
Bitwise AND binds tighter than logical AND? I hope
|
+ DomAutomationController::Install(frame); |
+ |
+ if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) |
+ StatsCollectionController::Install(frame); |
} |
void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { |