| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 384 |
| 385 if (propertyProcessed[property]) | 385 if (propertyProcessed[property]) |
| 386 continue; | 386 continue; |
| 387 | 387 |
| 388 try { | 388 try { |
| 389 propertyProcessed[property] = true; | 389 propertyProcessed[property] = true; |
| 390 var descriptor = nullifyObjectProto(InjectedScriptHost.suppr
essWarningsAndCallFunction(Object.getOwnPropertyDescriptor, Object, [o, property
])); | 390 var descriptor = nullifyObjectProto(InjectedScriptHost.suppr
essWarningsAndCallFunction(Object.getOwnPropertyDescriptor, Object, [o, property
])); |
| 391 if (descriptor) { | 391 if (descriptor) { |
| 392 if (accessorPropertiesOnly && !("get" in descriptor || "
set" in descriptor)) | 392 if (accessorPropertiesOnly && !("get" in descriptor || "
set" in descriptor)) |
| 393 continue; | 393 continue; |
| 394 if ("get" in descriptor && "set" in descriptor && name !
= "__proto__" && InjectedScriptHost.formatAccessorsAsProperties(object) && !does
AttributeHaveObservableSideEffectOnGet(object, name)) { | 394 if ("get" in descriptor && "set" in descriptor && name !
= "__proto__" && InjectedScriptHost.formatAccessorsAsProperties(object, descript
or.get) && !doesAttributeHaveObservableSideEffectOnGet(object, name)) { |
| 395 descriptor.value = InjectedScriptHost.suppressWarnin
gsAndCallFunction(function(attribute) { return this[attribute]; }, object, [prop
erty]); | 395 descriptor.value = InjectedScriptHost.suppressWarnin
gsAndCallFunction(function(attribute) { return this[attribute]; }, object, [prop
erty]); |
| 396 descriptor.isOwn = true; | 396 descriptor.isOwn = true; |
| 397 delete descriptor.get; | 397 delete descriptor.get; |
| 398 delete descriptor.set; | 398 delete descriptor.set; |
| 399 } | 399 } |
| 400 } else { | 400 } else { |
| 401 // Not all bindings provide proper descriptors. Fall bac
k to the writable, configurable property. | 401 // Not all bindings provide proper descriptors. Fall bac
k to the writable, configurable property. |
| 402 if (accessorPropertiesOnly) | 402 if (accessorPropertiesOnly) |
| 403 continue; | 403 continue; |
| 404 try { | 404 try { |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 return string.substr(0, leftHalf) + "\u2026" + string.substr(string.
length - rightHalf, rightHalf); | 1001 return string.substr(0, leftHalf) + "\u2026" + string.substr(string.
length - rightHalf, rightHalf); |
| 1002 } | 1002 } |
| 1003 return string.substr(0, maxLength) + "\u2026"; | 1003 return string.substr(0, maxLength) + "\u2026"; |
| 1004 }, | 1004 }, |
| 1005 | 1005 |
| 1006 __proto__: null | 1006 __proto__: null |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 return injectedScript; | 1009 return injectedScript; |
| 1010 }) | 1010 }) |
| OLD | NEW |