| Index: chrome/renderer/resources/extensions/automation/automation_node.js
|
| diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
|
| index 1598c6f9b0b8add00d770d08aaf8fed9d923008b..5e96405fd1cb408f2cc7fccc639c229a7b995ff0 100644
|
| --- a/chrome/renderer/resources/extensions/automation/automation_node.js
|
| +++ b/chrome/renderer/resources/extensions/automation/automation_node.js
|
| @@ -757,7 +757,14 @@ AutomationRootNodeImpl.prototype = {
|
| axNodeDataCache_: null,
|
|
|
| get id() {
|
| - return GetRootID(this.treeID);
|
| + var result = GetRootID(this.treeID);
|
| +
|
| + // Don't return undefined, because the id is often passed directly
|
| + // as an argument to a native binding that expects only a valid number.
|
| + if (result === undefined)
|
| + return -1;
|
| +
|
| + return result;
|
| },
|
|
|
| get: function(id) {
|
|
|