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

Unified Diff: src/compiler.cc

Issue 4248: Make sure that the body of the function created by calling Function is... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 3 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/compiler.h ('k') | src/debug-delay.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
===================================================================
--- src/compiler.cc (revision 369)
+++ src/compiler.cc (working copy)
@@ -202,8 +202,9 @@
}
-Handle<JSFunction> Compiler::CompileEval(bool is_global,
- Handle<String> source) {
+Handle<JSFunction> Compiler::CompileEval(Handle<String> source,
+ int line_offset,
+ bool is_global) {
Counters::total_eval_size.Increment(source->length());
Counters::total_compile_size.Increment(source->length());
@@ -219,6 +220,7 @@
if (result.is_null()) {
// Create a script object describing the script to be compiled.
Handle<Script> script = Factory::NewScript(source);
+ script->set_line_offset(Smi::FromInt(line_offset));
result = MakeFunction(is_global, true, script, NULL, NULL);
if (!result.is_null()) {
CompilationCache::Associate(source, entry, result);
« no previous file with comments | « src/compiler.h ('k') | src/debug-delay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698