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

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

Issue 2772093002: [inspector] exposed builtins for injected script source (Closed)
Patch Set: removed unused variable 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 | « src/debug/debug-interface.h ('k') | src/inspector/injected_script_externs.js » ('j') | 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..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);
« no previous file with comments | « src/debug/debug-interface.h ('k') | src/inspector/injected_script_externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698