Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/isolate.cc

Issue 284493003: Revert "v8::TryCatch now works correctly with ASAN's UseAfterReturn mode enabled." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/base/macros.h ('k') | src/zone.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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>( 275 SimulatorStack::RegisterCTryCatch(reinterpret_cast<uintptr_t>(that)));
276 that->DesanitizedThis())));
277 thread_local_top()->set_try_catch_handler_address(address); 276 thread_local_top()->set_try_catch_handler_address(address);
278 } 277 }
279 278
280 279
281 void Isolate::UnregisterTryCatchHandler(v8::TryCatch* that) { 280 void Isolate::UnregisterTryCatchHandler(v8::TryCatch* that) {
282 ASSERT(thread_local_top()->TryCatchHandler() == that->DesanitizedThis()); 281 ASSERT(thread_local_top()->TryCatchHandler() == that);
283 thread_local_top()->set_try_catch_handler_address( 282 thread_local_top()->set_try_catch_handler_address(
284 reinterpret_cast<Address>(that->next_)); 283 reinterpret_cast<Address>(that->next_));
285 thread_local_top()->catcher_ = NULL; 284 thread_local_top()->catcher_ = NULL;
286 SimulatorStack::UnregisterCTryCatch(); 285 SimulatorStack::UnregisterCTryCatch();
287 } 286 }
288 287
289 288
290 Handle<String> Isolate::StackTraceString() { 289 Handle<String> Isolate::StackTraceString() {
291 if (stack_trace_nesting_level_ == 0) { 290 if (stack_trace_nesting_level_ == 0) {
292 stack_trace_nesting_level_++; 291 stack_trace_nesting_level_++;
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 ASSERT(handle_scope_implementer()->CallDepthIsZero()); 2253 ASSERT(handle_scope_implementer()->CallDepthIsZero());
2255 2254
2256 // Increase call depth to prevent recursive callbacks. 2255 // Increase call depth to prevent recursive callbacks.
2257 handle_scope_implementer()->IncrementCallDepth(); 2256 handle_scope_implementer()->IncrementCallDepth();
2258 Execution::RunMicrotasks(this); 2257 Execution::RunMicrotasks(this);
2259 handle_scope_implementer()->DecrementCallDepth(); 2258 handle_scope_implementer()->DecrementCallDepth();
2260 } 2259 }
2261 2260
2262 2261
2263 } } // namespace v8::internal 2262 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/base/macros.h ('k') | src/zone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698