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

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

Issue 2770263003: [inspector] nullifyObjectPrototype -> InjectedScriptHost.nullifyPrototype (Closed)
Patch Set: correct nullifyPrototype usage 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 8215cdce54ede528cd79a9a38b942666c6165acd..3a3521a074cf2208316be2697d65a31adbf0da0f 100644
--- a/src/inspector/injected-script-source.js
+++ b/src/inspector/injected-script-source.js
@@ -77,18 +77,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}
*/
@@ -449,7 +437,6 @@ InjectedScript.prototype = {
descriptor.isOwn = true;
if (isSymbol(property))
descriptor.symbol = property;
- descriptor = nullifyObjectProto(descriptor);
if (!addPropertyIfNeeded(descriptors, descriptor))
return false;
}
@@ -1039,7 +1026,8 @@ InjectedScript.RemoteObject.prototype = {
preview.overflow = true;
break;
}
- var entry = nullifyObjectProto(entries[i]);
+ var entry = entries[i];
+ InjectedScriptHost.nullifyPrototype(entry);
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