Index: src/compiler.cc |
=================================================================== |
--- src/compiler.cc (revision 3753) |
+++ src/compiler.cc (working copy) |
@@ -144,12 +144,14 @@ |
// For eval scripts add information on the function from which eval was |
// called. |
if (is_eval) { |
- JavaScriptFrameIterator it; |
- script->set_eval_from_shared( |
- JSFunction::cast(it.frame()->function())->shared()); |
- int offset = static_cast<int>( |
- it.frame()->pc() - it.frame()->code()->instruction_start()); |
- script->set_eval_from_instructions_offset(Smi::FromInt(offset)); |
+ StackTraceFrameIterator it; |
+ if (!it.done()) { |
+ script->set_eval_from_shared( |
+ JSFunction::cast(it.frame()->function())->shared()); |
+ int offset = static_cast<int>( |
+ it.frame()->pc() - it.frame()->code()->instruction_start()); |
+ script->set_eval_from_instructions_offset(Smi::FromInt(offset)); |
+ } |
} |
} |