Index: src/mirror-debugger.js |
diff --git a/src/mirror-debugger.js b/src/mirror-debugger.js |
index c8d2461d6bf46f30c608b836adba3a78f2ed191f..affe43b693b2d8bbd52dacdad732aeea994d0023 100644 |
--- a/src/mirror-debugger.js |
+++ b/src/mirror-debugger.js |
@@ -193,13 +193,16 @@ PropertyAttribute.DontEnum = DONT_ENUM; |
PropertyAttribute.DontDelete = DONT_DELETE; |
-// A copy of the scope types from runtime.cc. |
+// A copy of the scope types from runtime-debug.cc. |
+// NOTE: these constants should be backward-compatible, so |
+// add new ones to the end of this list. |
var ScopeType = { Global: 0, |
Local: 1, |
With: 2, |
Closure: 3, |
Catch: 4, |
- Block: 5 }; |
+ Block: 5, |
+ Script: 6 }; |
// Mirror hierarchy: |
@@ -2293,11 +2296,12 @@ ScopeMirror.prototype.scopeType = function() { |
ScopeMirror.prototype.scopeObject = function() { |
- // For local and closure scopes create a transient mirror as these objects are |
- // created on the fly materializing the local or closure scopes and |
- // therefore will not preserve identity. |
+ // For local, closure and script scopes create a transient mirror |
+ // as these objects are created on the fly materializing the local |
+ // or closure scopes and therefore will not preserve identity. |
var transient = this.scopeType() == ScopeType.Local || |
- this.scopeType() == ScopeType.Closure; |
+ this.scopeType() == ScopeType.Closure || |
+ this.scopeType() == ScopeType.Script; |
return MakeMirror(this.details_.object(), transient); |
}; |