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

Unified Diff: src/mirror-delay.js

Issue 21074: Updated handling of the script mirror.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 | « no previous file | test/mjsunit/mirror-script.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « no previous file | test/mjsunit/mirror-script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698