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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
548 var name = property; | 548 var name = property; |
549 if (isSymbol(property)) | 549 if (isSymbol(property)) |
550 name = injectedScript._describe(property); | 550 name = injectedScript._describe(property); |
551 | 551 |
552 try { | 552 try { |
553 propertyProcessed[property] = true; | 553 propertyProcessed[property] = true; |
554 var descriptor = nullifyObjectProto(InjectedScriptHost.suppr essWarningsAndCallFunction(Object.getOwnPropertyDescriptor, Object, [o, property ])); | 554 var descriptor = nullifyObjectProto(InjectedScriptHost.suppr essWarningsAndCallFunction(Object.getOwnPropertyDescriptor, Object, [o, property ])); |
555 if (descriptor) { | 555 if (descriptor) { |
556 if (accessorPropertiesOnly && !("get" in descriptor || " set" in descriptor)) | 556 if (accessorPropertiesOnly && !("get" in descriptor || " set" in descriptor)) |
557 continue; | 557 continue; |
558 if ("get" in descriptor && "set" in descriptor && Inject edScriptHost.isPopularDOMObject(object) && name != "__proto__") { | 558 if ("get" in descriptor && "set" in descriptor && name ! = "__proto__" && InjectedScriptHost.isDOMAttributeWithNoSideEffect(object, name) ) { |
haraken
2015/03/05 15:14:26
If pfeldman@ is fine, IMHO, we should do the black
pfeldman
2015/03/05 17:42:54
I'm fine with it as long as the instanceof Request
haraken
2015/03/06 02:29:19
If we want to implement the instanceof Request/Res
| |
559 descriptor.value = InjectedScriptHost.suppressWarnin gsAndCallFunction(function(attribute) { return this[attribute]; }, object, [name ]); | 559 descriptor.value = InjectedScriptHost.suppressWarnin gsAndCallFunction(function(attribute) { return this[attribute]; }, object, [name ]); |
560 delete descriptor.get; | 560 delete descriptor.get; |
561 delete descriptor.set; | 561 delete descriptor.set; |
562 } | 562 } |
563 } else { | 563 } else { |
564 // Not all bindings provide proper descriptors. Fall bac k to the writable, configurable property. | 564 // Not all bindings provide proper descriptors. Fall bac k to the writable, configurable property. |
565 if (accessorPropertiesOnly) | 565 if (accessorPropertiesOnly) |
566 continue; | 566 continue; |
567 try { | 567 try { |
568 descriptor = { name: name, value: o[property], writa ble: false, configurable: false, enumerable: false, __proto__: null }; | 568 descriptor = { name: name, value: o[property], writa ble: false, configurable: false, enumerable: false, __proto__: null }; |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1929 */ | 1929 */ |
1930 _logEvent: function(event) | 1930 _logEvent: function(event) |
1931 { | 1931 { |
1932 inspectedWindow.console.log(event.type, event); | 1932 inspectedWindow.console.log(event.type, event); |
1933 } | 1933 } |
1934 } | 1934 } |
1935 | 1935 |
1936 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1936 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
1937 return injectedScript; | 1937 return injectedScript; |
1938 }) | 1938 }) |
OLD | NEW |