| 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 | 611 if (function_info.is_null()) return false; |
| 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 } | |
| 618 | 612 |
| 619 // Execute the shared function in the debugger context. | 613 // Execute the shared function in the debugger context. |
| 620 Handle<JSFunction> function = | 614 Handle<JSFunction> function = |
| 621 factory->NewFunctionFromSharedFunctionInfo(function_info, context); | 615 factory->NewFunctionFromSharedFunctionInfo(function_info, context); |
| 622 | 616 |
| 623 MaybeHandle<Object> maybe_exception; | 617 MaybeHandle<Object> maybe_exception; |
| 624 MaybeHandle<Object> result = Execution::TryCall( | 618 MaybeHandle<Object> result = Execution::TryCall( |
| 625 function, handle(context->global_proxy()), 0, NULL, &maybe_exception); | 619 function, handle(context->global_proxy()), 0, NULL, &maybe_exception); |
| 626 | 620 |
| 627 // Check for caught exceptions. | 621 // Check for caught exceptions. |
| (...skipping 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3362 logger_->DebugEvent("Put", message.text()); | 3356 logger_->DebugEvent("Put", message.text()); |
| 3363 } | 3357 } |
| 3364 | 3358 |
| 3365 | 3359 |
| 3366 void LockingCommandMessageQueue::Clear() { | 3360 void LockingCommandMessageQueue::Clear() { |
| 3367 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3361 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 3368 queue_.Clear(); | 3362 queue_.Clear(); |
| 3369 } | 3363 } |
| 3370 | 3364 |
| 3371 } } // namespace v8::internal | 3365 } } // namespace v8::internal |
| OLD | NEW |