| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 name = /** @type {string} */ (injectedScript._describe(prope
rty)); | 396 name = /** @type {string} */ (injectedScript._describe(prope
rty)); |
| 397 else | 397 else |
| 398 name = typeof property === "number" ? ("" + property) : /**
@type {string} */(property); | 398 name = typeof property === "number" ? ("" + property) : /**
@type {string} */(property); |
| 399 | 399 |
| 400 if (subtype === "internal#scopeList" && name === "length") | 400 if (subtype === "internal#scopeList" && name === "length") |
| 401 continue; | 401 continue; |
| 402 | 402 |
| 403 var descriptor; | 403 var descriptor; |
| 404 try { | 404 try { |
| 405 descriptor = InjectedScriptHost.getOwnPropertyDescriptor(o,
property); | 405 descriptor = InjectedScriptHost.getOwnPropertyDescriptor(o,
property); |
| 406 InjectedScriptHost.nullifyPrototype(descriptor); | 406 if (descriptor) { |
| 407 InjectedScriptHost.nullifyPrototype(descriptor); |
| 408 } |
| 407 var isAccessorProperty = descriptor && ("get" in descriptor
|| "set" in descriptor); | 409 var isAccessorProperty = descriptor && ("get" in descriptor
|| "set" in descriptor); |
| 408 if (accessorPropertiesOnly && !isAccessorProperty) | 410 if (accessorPropertiesOnly && !isAccessorProperty) |
| 409 continue; | 411 continue; |
| 410 if (descriptor && "get" in descriptor && "set" in descriptor
&& name !== "__proto__" && | 412 if (descriptor && "get" in descriptor && "set" in descriptor
&& name !== "__proto__" && |
| 411 InjectedScriptHost.formatAccessorsAsProperties(objec
t, descriptor.get) && | 413 InjectedScriptHost.formatAccessorsAsProperties(objec
t, descriptor.get) && |
| 412 !doesAttributeHaveObservableSideEffectOnGet(object,
name)) { | 414 !doesAttributeHaveObservableSideEffectOnGet(object,
name)) { |
| 413 descriptor.value = object[property]; | 415 descriptor.value = object[property]; |
| 414 descriptor.isOwn = true; | 416 descriptor.isOwn = true; |
| 415 delete descriptor.get; | 417 delete descriptor.get; |
| 416 delete descriptor.set; | 418 delete descriptor.set; |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 return string.substr(0, leftHalf) + "\u2026" + string.substr(string.
length - rightHalf, rightHalf); | 1067 return string.substr(0, leftHalf) + "\u2026" + string.substr(string.
length - rightHalf, rightHalf); |
| 1066 } | 1068 } |
| 1067 return string.substr(0, maxLength) + "\u2026"; | 1069 return string.substr(0, maxLength) + "\u2026"; |
| 1068 }, | 1070 }, |
| 1069 | 1071 |
| 1070 __proto__: null | 1072 __proto__: null |
| 1071 } | 1073 } |
| 1072 | 1074 |
| 1073 return injectedScript; | 1075 return injectedScript; |
| 1074 }) | 1076 }) |
| OLD | NEW |