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

Unified Diff: src/inspector/debugger-script.js

Issue 2670823002: [debugger] remove mirror cache and v8::Debug::GetMirror. (Closed)
Patch Set: address comments. Created 3 years, 11 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/mirrors.js ('k') | src/inspector/debugger_script_externs.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/debugger-script.js
diff --git a/src/inspector/debugger-script.js b/src/inspector/debugger-script.js
index c9ede086ac5b3c8bbc82faf734ea9cb28ea7062a..34b2effbdb7d9973d40fc417b7942747cf9f26a2 100644
--- a/src/inspector/debugger-script.js
+++ b/src/inspector/debugger-script.js
@@ -107,7 +107,7 @@ DebuggerScript.getGeneratorScopes = function(gen)
*/
DebuggerScript.getGeneratorObjectLocation = function(object)
{
- var mirror = MakeMirror(object, true /* transient */);
+ var mirror = MakeMirror(object);
if (!mirror.isGenerator())
return null;
var generatorMirror = /** @type {!GeneratorMirror} */(mirror);
@@ -132,7 +132,7 @@ DebuggerScript.getGeneratorObjectLocation = function(object)
*/
DebuggerScript.getCollectionEntries = function(object)
{
- var mirror = MakeMirror(object, true /* transient */);
+ var mirror = MakeMirror(object);
if (mirror.isMap())
return /** @type {!MapMirror} */(mirror).entries();
if (mirror.isSet() || mirror.isIterator()) {
@@ -548,7 +548,7 @@ DebuggerScript._buildScopeObject = function(scopeType, scopeObject)
// the same properties.
// Reset scope object prototype to null so that the proto properties
// don't appear in the local scope section.
- var properties = /** @type {!ObjectMirror} */(MakeMirror(scopeObject, true /* transient */)).properties();
+ var properties = /** @type {!ObjectMirror} */(MakeMirror(scopeObject)).properties();
// Almost always Script scope will be empty, so just filter out that noise.
// Also drop empty Block, Eval and Script scopes, should we get any.
if (!properties.length && (scopeType === ScopeType.Script ||
@@ -573,8 +573,5 @@ DebuggerScript._buildScopeObject = function(scopeType, scopeObject)
return result;
}
-// We never resolve Mirror by its handle so to avoid memory leaks caused by Mirrors in the cache we disable it.
-ToggleMirrorCache(false);
-
return DebuggerScript;
})();
« no previous file with comments | « src/debug/mirrors.js ('k') | src/inspector/debugger_script_externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698