| Index: chrome/test/chromedriver/js/call_function.js
|
| diff --git a/chrome/test/chromedriver/js/call_function.js b/chrome/test/chromedriver/js/call_function.js
|
| index ab1551b1fa8ccfc0e19790196fb2aeb3d5b52446..17a0ae557addbdbdd5a6355e367b0a8f6f67b836 100644
|
| --- a/chrome/test/chromedriver/js/call_function.js
|
| +++ b/chrome/test/chromedriver/js/call_function.js
|
| @@ -149,7 +149,7 @@ function getPageCache(opt_doc) {
|
| * @return {*} The wrapped value.
|
| */
|
| function wrap(value) {
|
| - if (typeof(value) == 'object' && value != null) {
|
| + if (value instanceof Object && value != null) {
|
| var nodeType = value['nodeType'];
|
| if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT
|
| || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {
|
| @@ -176,7 +176,7 @@ function wrap(value) {
|
| * @return {*} The unwrapped value.
|
| */
|
| function unwrap(value, cache) {
|
| - if (typeof(value) == 'object' && value != null) {
|
| + if (value instanceof Object && value != null) {
|
| if (ELEMENT_KEY in value)
|
| return cache.retrieveItem(value[ELEMENT_KEY]);
|
|
|
|
|