| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include "v8.h" | 7 #include "v8.h" |
| 8 | 8 |
| 9 #include "ast.h" | 9 #include "ast.h" |
| 10 #include "bootstrapper.h" | 10 #include "bootstrapper.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 #endif // DEBUG | 265 #endif // DEBUG |
| 266 | 266 |
| 267 | 267 |
| 268 void Isolate::RegisterTryCatchHandler(v8::TryCatch* that) { | 268 void Isolate::RegisterTryCatchHandler(v8::TryCatch* that) { |
| 269 // The ARM simulator has a separate JS stack. We therefore register | 269 // The ARM simulator has a separate JS stack. We therefore register |
| 270 // the C++ try catch handler with the simulator and get back an | 270 // the C++ try catch handler with the simulator and get back an |
| 271 // address that can be used for comparisons with addresses into the | 271 // address that can be used for comparisons with addresses into the |
| 272 // JS stack. When running without the simulator, the address | 272 // JS stack. When running without the simulator, the address |
| 273 // returned will be the address of the C++ try catch handler itself. | 273 // returned will be the address of the C++ try catch handler itself. |
| 274 Address address = reinterpret_cast<Address>( | 274 Address address = reinterpret_cast<Address>( |
| 275 SimulatorStack::RegisterCTryCatch(reinterpret_cast<uintptr_t>(that))); | 275 SimulatorStack::RegisterCTryCatch(reinterpret_cast<uintptr_t>( |
| 276 that->DesanitizedThis()))); |
| 276 thread_local_top()->set_try_catch_handler_address(address); | 277 thread_local_top()->set_try_catch_handler_address(address); |
| 277 } | 278 } |
| 278 | 279 |
| 279 | 280 |
| 280 void Isolate::UnregisterTryCatchHandler(v8::TryCatch* that) { | 281 void Isolate::UnregisterTryCatchHandler(v8::TryCatch* that) { |
| 281 ASSERT(thread_local_top()->TryCatchHandler() == that); | 282 ASSERT(thread_local_top()->TryCatchHandler() == that->DesanitizedThis()); |
| 282 thread_local_top()->set_try_catch_handler_address( | 283 thread_local_top()->set_try_catch_handler_address( |
| 283 reinterpret_cast<Address>(that->next_)); | 284 reinterpret_cast<Address>(that->next_)); |
| 284 thread_local_top()->catcher_ = NULL; | 285 thread_local_top()->catcher_ = NULL; |
| 285 SimulatorStack::UnregisterCTryCatch(); | 286 SimulatorStack::UnregisterCTryCatch(); |
| 286 } | 287 } |
| 287 | 288 |
| 288 | 289 |
| 289 Handle<String> Isolate::StackTraceString() { | 290 Handle<String> Isolate::StackTraceString() { |
| 290 if (stack_trace_nesting_level_ == 0) { | 291 if (stack_trace_nesting_level_ == 0) { |
| 291 stack_trace_nesting_level_++; | 292 stack_trace_nesting_level_++; |
| (...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2253 ASSERT(handle_scope_implementer()->CallDepthIsZero()); | 2254 ASSERT(handle_scope_implementer()->CallDepthIsZero()); |
| 2254 | 2255 |
| 2255 // Increase call depth to prevent recursive callbacks. | 2256 // Increase call depth to prevent recursive callbacks. |
| 2256 handle_scope_implementer()->IncrementCallDepth(); | 2257 handle_scope_implementer()->IncrementCallDepth(); |
| 2257 Execution::RunMicrotasks(this); | 2258 Execution::RunMicrotasks(this); |
| 2258 handle_scope_implementer()->DecrementCallDepth(); | 2259 handle_scope_implementer()->DecrementCallDepth(); |
| 2259 } | 2260 } |
| 2260 | 2261 |
| 2261 | 2262 |
| 2262 } } // namespace v8::internal | 2263 } } // namespace v8::internal |
| OLD | NEW |