Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js

Issue 2324093002: Don't trigger Object.prototype setters when generating completions (Closed)
Patch Set: Literal with __proto__ instead of Object.create() Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 var object; 679 var object;
680 if (type === "string") 680 if (type === "string")
681 object = new String(""); 681 object = new String("");
682 else if (type === "number") 682 else if (type === "number")
683 object = new Number(0); 683 object = new Number(0);
684 else if (type === "boolean") 684 else if (type === "boolean")
685 object = new Boolean(false); 685 object = new Boolean(false);
686 else 686 else
687 object = this; 687 object = this;
688 688
689 var resultSet = {}; 689 var resultSet = { __proto__: null };
690 try { 690 try {
691 for (var o = object; o; o = Object.getPrototypeOf(o)) { 691 for (var o = object; o; o = Object.getPrototypeOf(o)) {
692 if ((type === "array" || type === "typedarray") && o === object && ArrayBuffer.isView(o) && o.length > 9999) 692 if ((type === "array" || type === "typedarray") && o === object && ArrayBuffer.isView(o) && o.length > 9999)
693 continue; 693 continue;
694 var names = Object.getOwnPropertyNames(o); 694 var names = Object.getOwnPropertyNames(o);
695 var isArray = Array.isArray(o); 695 var isArray = Array.isArray(o);
696 for (var i = 0; i < names.length; ++i) { 696 for (var i = 0; i < names.length; ++i) {
697 // Skip array elements indexes. 697 // Skip array elements indexes.
698 if (isArray && /^[0-9]/.test(names[i])) 698 if (isArray && /^[0-9]/.test(names[i]))
699 continue; 699 continue;
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 /** 1014 /**
1015 * @return {boolean} 1015 * @return {boolean}
1016 */ 1016 */
1017 isNormalListenerType: function() 1017 isNormalListenerType: function()
1018 { 1018 {
1019 return this._listenerType === "normal"; 1019 return this._listenerType === "normal";
1020 }, 1020 },
1021 1021
1022 __proto__: WebInspector.SDKObject.prototype 1022 __proto__: WebInspector.SDKObject.prototype
1023 } 1023 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698