Index: src/mirror-delay.js |
=================================================================== |
--- src/mirror-delay.js (revision 1220) |
+++ src/mirror-delay.js (working copy) |
@@ -87,6 +87,8 @@ |
mirror = new RegExpMirror(value); |
} else if (IS_ERROR(value)) { |
mirror = new ErrorMirror(value); |
+ } else if (IS_SCRIPT(value)) { |
+ mirror = new ScriptMirror(value); |
} else { |
mirror = new ObjectMirror(value); |
} |
@@ -777,7 +779,7 @@ |
if (this.resolved()) { |
var script = %FunctionGetScript(this.value_); |
if (script) { |
- return new ScriptMirror(script); |
+ return MakeMirror(script); |
} |
} |
}; |
@@ -1548,11 +1550,21 @@ |
inherits(ScriptMirror, Mirror); |
+ScriptMirror.prototype.value = function() { |
+ return this.script_; |
+}; |
+ |
+ |
ScriptMirror.prototype.name = function() { |
return this.script_.name; |
}; |
+ScriptMirror.prototype.source = function() { |
+ return this.script_.source; |
+}; |
+ |
+ |
ScriptMirror.prototype.lineOffset = function() { |
return this.script_.line_offset; |
}; |