OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 Handle<String> script_name = | 601 Handle<String> script_name = |
602 factory->NewStringFromAscii(name).ToHandleChecked(); | 602 factory->NewStringFromAscii(name).ToHandleChecked(); |
603 Handle<Context> context = isolate->native_context(); | 603 Handle<Context> context = isolate->native_context(); |
604 | 604 |
605 // Compile the script. | 605 // Compile the script. |
606 Handle<SharedFunctionInfo> function_info; | 606 Handle<SharedFunctionInfo> function_info; |
607 function_info = Compiler::CompileScript( | 607 function_info = Compiler::CompileScript( |
608 source_code, script_name, 0, 0, ScriptOriginOptions(), Handle<Object>(), | 608 source_code, script_name, 0, 0, ScriptOriginOptions(), Handle<Object>(), |
609 context, NULL, NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, | 609 context, NULL, NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, |
610 false); | 610 false); |
611 if (function_info.is_null()) return false; | 611 |
| 612 // Silently ignore stack overflows during compilation. |
| 613 if (function_info.is_null()) { |
| 614 DCHECK(isolate->has_pending_exception()); |
| 615 isolate->clear_pending_exception(); |
| 616 return false; |
| 617 } |
612 | 618 |
613 // Execute the shared function in the debugger context. | 619 // Execute the shared function in the debugger context. |
614 Handle<JSFunction> function = | 620 Handle<JSFunction> function = |
615 factory->NewFunctionFromSharedFunctionInfo(function_info, context); | 621 factory->NewFunctionFromSharedFunctionInfo(function_info, context); |
616 | 622 |
617 MaybeHandle<Object> maybe_exception; | 623 MaybeHandle<Object> maybe_exception; |
618 MaybeHandle<Object> result = Execution::TryCall( | 624 MaybeHandle<Object> result = Execution::TryCall( |
619 function, handle(context->global_proxy()), 0, NULL, &maybe_exception); | 625 function, handle(context->global_proxy()), 0, NULL, &maybe_exception); |
620 | 626 |
621 // Check for caught exceptions. | 627 // Check for caught exceptions. |
(...skipping 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3356 logger_->DebugEvent("Put", message.text()); | 3362 logger_->DebugEvent("Put", message.text()); |
3357 } | 3363 } |
3358 | 3364 |
3359 | 3365 |
3360 void LockingCommandMessageQueue::Clear() { | 3366 void LockingCommandMessageQueue::Clear() { |
3361 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3367 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3362 queue_.Clear(); | 3368 queue_.Clear(); |
3363 } | 3369 } |
3364 | 3370 |
3365 } } // namespace v8::internal | 3371 } } // namespace v8::internal |
OLD | NEW |