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

Side by Side Diff: src/isolate.h

Issue 7129002: Fix bug 1433: clear the global thread table when an isolate is disposed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | « no previous file | src/isolate.cc » ('j') | test/cctest/test-lockers.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 522
523 // Debug. 523 // Debug.
524 // Mutex for serializing access to break control structures. 524 // Mutex for serializing access to break control structures.
525 Mutex* break_access() { return break_access_; } 525 Mutex* break_access() { return break_access_; }
526 526
527 Address get_address_from_id(AddressId id); 527 Address get_address_from_id(AddressId id);
528 528
529 // Access to top context (where the current function object was created). 529 // Access to top context (where the current function object was created).
530 Context* context() { return thread_local_top_.context_; } 530 Context* context() { return thread_local_top_.context_; }
531 void set_context(Context* context) { 531 void set_context(Context* context) {
532 ASSERT(context == NULL || context->IsContext());
532 thread_local_top_.context_ = context; 533 thread_local_top_.context_ = context;
533 } 534 }
534 Context** context_address() { return &thread_local_top_.context_; } 535 Context** context_address() { return &thread_local_top_.context_; }
535 536
536 SaveContext* save_context() {return thread_local_top_.save_context_; } 537 SaveContext* save_context() {return thread_local_top_.save_context_; }
537 void set_save_context(SaveContext* save) { 538 void set_save_context(SaveContext* save) {
538 thread_local_top_.save_context_ = save; 539 thread_local_top_.save_context_ = save;
539 } 540 }
540 541
541 // Access to current thread id. 542 // Access to current thread id.
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 // modified. 997 // modified.
997 class ThreadDataTable { 998 class ThreadDataTable {
998 public: 999 public:
999 ThreadDataTable(); 1000 ThreadDataTable();
1000 ~ThreadDataTable(); 1001 ~ThreadDataTable();
1001 1002
1002 PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id); 1003 PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id);
1003 void Insert(PerIsolateThreadData* data); 1004 void Insert(PerIsolateThreadData* data);
1004 void Remove(Isolate* isolate, ThreadId thread_id); 1005 void Remove(Isolate* isolate, ThreadId thread_id);
1005 void Remove(PerIsolateThreadData* data); 1006 void Remove(PerIsolateThreadData* data);
1007 void RemoveAllThreads(Isolate* isolate);
1006 1008
1007 private: 1009 private:
1008 PerIsolateThreadData* list_; 1010 PerIsolateThreadData* list_;
1009 }; 1011 };
1010 1012
1011 // These items form a stack synchronously with threads Enter'ing and Exit'ing 1013 // These items form a stack synchronously with threads Enter'ing and Exit'ing
1012 // the Isolate. The top of the stack points to a thread which is currently 1014 // the Isolate. The top of the stack points to a thread which is currently
1013 // running the Isolate. When the stack is empty, the Isolate is considered 1015 // running the Isolate. When the stack is empty, the Isolate is considered
1014 // not entered by any thread and can be Disposed. 1016 // not entered by any thread and can be Disposed.
1015 // If the same thread enters the Isolate more then once, the entry_count_ 1017 // If the same thread enters the Isolate more then once, the entry_count_
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 1365
1364 } } // namespace v8::internal 1366 } } // namespace v8::internal
1365 1367
1366 // TODO(isolates): Get rid of these -inl.h includes and place them only where 1368 // TODO(isolates): Get rid of these -inl.h includes and place them only where
1367 // they're needed. 1369 // they're needed.
1368 #include "allocation-inl.h" 1370 #include "allocation-inl.h"
1369 #include "zone-inl.h" 1371 #include "zone-inl.h"
1370 #include "frames-inl.h" 1372 #include "frames-inl.h"
1371 1373
1372 #endif // V8_ISOLATE_H_ 1374 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | test/cctest/test-lockers.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698