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

Unified Diff: src/runtime.cc

Issue 7491053: Fix DebugEvaluate crash within a catch in a function without local context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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/regress/regress-1586.js » ('j') | test/mjsunit/regress/regress-1586.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 7cfd069678c3fec1868f603e55e8bea24d7cef6c..42df28d00d9edf5a6248cf6dd816ab15994b3fda 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -11434,7 +11434,11 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) {
context->set_extension(*local_scope);
// Copy any with contexts present and chain them in front of this context.
Handle<Context> frame_context(Context::cast(frame->context()));
- Handle<Context> function_context(frame_context->declaration_context());
+ Handle<Context> function_context;
+ // Get the function's context if it has one.
+ if (scope_info->HasHeapAllocatedLocals()) {
+ function_context = Handle<Context>(frame_context->declaration_context());
+ }
context = CopyWithContextChain(isolate, go_between, frame_context, context);
if (additional_context->IsJSObject()) {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1586.js » ('j') | test/mjsunit/regress/regress-1586.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698