| Index: chrome/renderer/extensions/automation_internal_custom_bindings.cc
|
| diff --git a/chrome/renderer/extensions/automation_internal_custom_bindings.cc b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
|
| index 221c166b9f8f63a27b781a7524c0c49ac5cefe25..6db09b8295d5d92503d17023f6c7444f81cf7e98 100644
|
| --- a/chrome/renderer/extensions/automation_internal_custom_bindings.cc
|
| +++ b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
|
| @@ -1145,8 +1145,15 @@ void AutomationInternalCustomBindings::OnAccessibilityEvent(
|
| // Update the internal state whether it's the active profile or not.
|
| cache->location_offset = params.location_offset;
|
| deleted_node_ids_.clear();
|
| + v8::Isolate* isolate = GetIsolate();
|
| + v8::HandleScope handle_scope(isolate);
|
| + v8::Context::Scope context_scope(context()->v8_context());
|
| + v8::Local<v8::Array> args(v8::Array::New(GetIsolate(), 1U));
|
| if (!cache->tree.Unserialize(params.update)) {
|
| LOG(ERROR) << cache->tree.error();
|
| + args->Set(0U, v8::Number::New(isolate, tree_id));
|
| + context()->DispatchEvent(
|
| + "automationInternal.onAccessibilityTreeSerializationError", args);
|
| return;
|
| }
|
|
|
| @@ -1157,10 +1164,6 @@ void AutomationInternalCustomBindings::OnAccessibilityEvent(
|
| SendNodesRemovedEvent(&cache->tree, deleted_node_ids_);
|
| deleted_node_ids_.clear();
|
|
|
| - v8::Isolate* isolate = GetIsolate();
|
| - v8::HandleScope handle_scope(isolate);
|
| - v8::Context::Scope context_scope(context()->v8_context());
|
| - v8::Local<v8::Array> args(v8::Array::New(GetIsolate(), 1U));
|
| v8::Local<v8::Object> event_params(v8::Object::New(GetIsolate()));
|
| event_params->Set(CreateV8String(isolate, "treeID"),
|
| v8::Integer::New(GetIsolate(), params.tree_id));
|
|
|