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

Unified Diff: src/inspector/injected-script-source.js

Issue 2770263003: [inspector] nullifyObjectPrototype -> InjectedScriptHost.nullifyPrototype (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« 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