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..8215cdce54ede528cd79a9a38b942666c6165acd 100644 |
--- a/src/inspector/injected-script-source.js |
+++ b/src/inspector/injected-script-source.js |
@@ -38,12 +38,6 @@ |
(function (InjectedScriptHost, inspectedGlobalObject, injectedScriptId) { |
/** |
- * Protect against Object overwritten by the user code. |
- * @suppress {duplicate} |
- */ |
-var Object = /** @type {function(new:Object, *=)} */ ({}.constructor); |
- |
-/** |
* @param {!Array.<T>} array |
* @param {...} var_args |
* @template T |
@@ -187,7 +181,7 @@ var InjectedScript = function() |
InjectedScriptHost.nullifyPrototype(InjectedScript); |
/** |
- * @type {!Object.<string, boolean>} |
+ * @type {!Object<string, boolean>} |
* @const |
*/ |
InjectedScript.primitiveTypes = { |
@@ -373,7 +367,7 @@ InjectedScript.prototype = { |
if (InjectedScriptHost.subtype(object) === "proxy") |
return null; |
try { |
- return Object.getPrototypeOf(object); |
+ return InjectedScriptHost.getPrototypeOf(object); |
} catch (e) { |
return null; |
} |
@@ -420,7 +414,7 @@ InjectedScript.prototype = { |
var descriptor; |
try { |
- descriptor = Object.getOwnPropertyDescriptor(o, property); |
+ descriptor = InjectedScriptHost.getOwnPropertyDescriptor(o, property); |
InjectedScriptHost.nullifyPrototype(descriptor); |
var isAccessorProperty = descriptor && ("get" in descriptor || "set" in descriptor); |
if (accessorPropertiesOnly && !isAccessorProperty) |
@@ -496,15 +490,13 @@ InjectedScript.prototype = { |
return descriptors; |
} else { |
// First call Object.keys() to enforce ordering of the property descriptors. |
- if (!process(o, Object.keys(o))) |
+ if (!process(o, InjectedScriptHost.keys(o))) |
return descriptors; |
- if (!process(o, Object.getOwnPropertyNames(o))) |
- return descriptors; |
- } |
- if (Object.getOwnPropertySymbols) { |
- if (!process(o, Object.getOwnPropertySymbols(o))) |
+ if (!process(o, InjectedScriptHost.getOwnPropertyNames(o))) |
return descriptors; |
} |
+ if (!process(o, InjectedScriptHost.getOwnPropertySymbols(o))) |
+ return descriptors; |
if (ownProperties) { |
var proto = this._objectPrototype(o); |