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

Side by Side Diff: src/isolate.cc

Issue 3545004: [Isolates] Avoid isolate lookup in HandleScope destructor. (Closed)
Patch Set: Created 10 years, 2 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
OLDNEW
1 // Copyright 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 #ifdef ENABLE_DEBUGGER_SUPPORT 369 #ifdef ENABLE_DEBUGGER_SUPPORT
370 debug_ = NULL; 370 debug_ = NULL;
371 debugger_ = NULL; 371 debugger_ = NULL;
372 #endif 372 #endif
373 373
374 #ifdef ENABLE_LOGGING_AND_PROFILING 374 #ifdef ENABLE_LOGGING_AND_PROFILING
375 producer_heap_profile_ = NULL; 375 producer_heap_profile_ = NULL;
376 #endif 376 #endif
377 377
378 handle_scope_data_.Initialize(); 378 handle_scope_data_.Initialize(this);
379 379
380 #define ISOLATE_INIT_EXECUTE(type, name, initial_value) \ 380 #define ISOLATE_INIT_EXECUTE(type, name, initial_value) \
381 name##_ = (initial_value); 381 name##_ = (initial_value);
382 ISOLATE_INIT_LIST(ISOLATE_INIT_EXECUTE) 382 ISOLATE_INIT_LIST(ISOLATE_INIT_EXECUTE)
383 #undef ISOLATE_INIT_EXECUTE 383 #undef ISOLATE_INIT_EXECUTE
384 384
385 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \ 385 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \
386 memset(name##_, 0, sizeof(type) * length); 386 memset(name##_, 0, sizeof(type) * length);
387 ISOLATE_INIT_ARRAY_LIST(ISOLATE_INIT_ARRAY_EXECUTE) 387 ISOLATE_INIT_ARRAY_LIST(ISOLATE_INIT_ARRAY_EXECUTE)
388 #undef ISOLATE_INIT_ARRAY_EXECUTE 388 #undef ISOLATE_INIT_ARRAY_EXECUTE
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 Isolate* previous_isolate = item->previous_isolate; 730 Isolate* previous_isolate = item->previous_isolate;
731 731
732 delete item; 732 delete item;
733 733
734 // Reinit the current thread for the isolate it was running before this one. 734 // Reinit the current thread for the isolate it was running before this one.
735 Thread::SetThreadLocal(per_isolate_thread_data_key_, previous_thread_data); 735 Thread::SetThreadLocal(per_isolate_thread_data_key_, previous_thread_data);
736 Thread::SetThreadLocal(isolate_key_, previous_isolate); 736 Thread::SetThreadLocal(isolate_key_, previous_isolate);
737 } 737 }
738 738
739 } } // namespace v8::internal 739 } } // namespace v8::internal
OLDNEW
« include/v8.h ('K') | « src/handles-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698