Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 12707) |
+++ src/runtime.cc (working copy) |
@@ -11793,6 +11793,16 @@ |
scope_info, |
function_context); |
+ |
Michael Starzinger
2012/10/15 09:51:25
Remove second empty newline for readability.
yurys
2012/10/15 10:14:53
Done.
|
+ // Check if eval is blocked in the context and temporarily allow it |
+ // for debugger. |
+ Handle<Context> native_context = Handle<Context>(context->native_context()); |
+ bool eval_disabled = |
+ native_context->allow_code_gen_from_strings()->IsFalse(); |
+ if (eval_disabled) { |
+ native_context->set_allow_code_gen_from_strings( |
+ isolate->heap()->true_value()); |
+ } |
// Invoke the evaluation function and return the result. |
Handle<Object> argv[] = { arguments, source }; |
Handle<Object> result = |
@@ -11801,6 +11811,10 @@ |
ARRAY_SIZE(argv), |
argv, |
&has_pending_exception); |
+ if (eval_disabled) { |
+ native_context->set_allow_code_gen_from_strings( |
+ isolate->heap()->false_value()); |
+ } |
if (has_pending_exception) return Failure::Exception(); |
// Skip the global proxy as it has no properties and always delegates to the |