Chromium Code Reviews| Index: src/inspector/injected-script-source.js |
| diff --git a/src/inspector/injected-script-source.js b/src/inspector/injected-script-source.js |
| index 6ec737d3773d08cdbec24a937a0831c1148f822c..6874d2ea53405299aff34f924504272e14ef4e77 100644 |
| --- a/src/inspector/injected-script-source.js |
| +++ b/src/inspector/injected-script-source.js |
| @@ -83,18 +83,6 @@ function toStringDescription(obj) |
| } |
| /** |
| - * @param {T} obj |
| - * @return {T} |
| - * @template T |
| - */ |
| -function nullifyObjectProto(obj) |
| -{ |
| - if (obj && typeof obj === "object") |
| - obj.__proto__ = null; |
| - return obj; |
| -} |
| - |
| -/** |
| * @param {number|string} obj |
| * @return {boolean} |
| */ |
| @@ -455,7 +443,6 @@ InjectedScript.prototype = { |
| descriptor.isOwn = true; |
| if (isSymbol(property)) |
| descriptor.symbol = property; |
| - descriptor = nullifyObjectProto(descriptor); |
| if (!addPropertyIfNeeded(descriptors, descriptor)) |
| return false; |
| } |
| @@ -1047,7 +1034,7 @@ InjectedScript.RemoteObject.prototype = { |
| preview.overflow = true; |
| break; |
| } |
| - var entry = nullifyObjectProto(entries[i]); |
| + var entry = InjectedScriptHost.nullifyPrototype(entries[i]); |
|
kozy
2017/03/24 20:23:04
I couldn't add a test since we return entry with n
|
| var previewEntry = { |
| value: generateValuePreview(entry.value), |
| __proto__: null |