Chromium Code Reviews| Index: src/execution.cc |
| diff --git a/src/execution.cc b/src/execution.cc |
| index bef01a2a91ca47331eb7ff7236795cf12cd658b0..924814cff46cb4257e185eac1c78734eb1b1c884 100644 |
| --- a/src/execution.cc |
| +++ b/src/execution.cc |
| @@ -78,6 +78,12 @@ static Handle<Object> Invoke(bool is_construct, |
| // Entering JavaScript. |
| VMState<JS> state(isolate); |
| CHECK(AllowJavascriptExecution::IsAllowed(isolate)); |
| + if (!ThrowOnJavascriptExecution::IsAllowed(isolate)) { |
| + isolate->ThrowIllegalOperation(); |
|
pmarch
2014/03/19 12:55:42
This does not result in JS code execution when con
Yang
2014/03/19 13:05:23
Right. JS execution happens only if you allocate a
|
| + *has_pending_exception = true; |
| + isolate->ReportPendingMessages(); |
| + return Handle<Object>(); |
| + } |
| // Placeholder for return value. |
| MaybeObject* value = reinterpret_cast<Object*>(kZapValue); |