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

Side by Side Diff: src/api.h

Issue 6903154: Revert "This implements per-isolate locking and unlocking, including tests" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « include/v8.h ('k') | src/api.cc » ('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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // neat in some ways, but it would expose internal implementation details in 392 // neat in some ways, but it would expose internal implementation details in
393 // our public header file, which is undesirable. 393 // our public header file, which is undesirable.
394 // 394 //
395 // An isolate has a single instance of this class to hold the current thread's 395 // An isolate has a single instance of this class to hold the current thread's
396 // data. In multithreaded V8 programs this data is copied in and out of storage 396 // data. In multithreaded V8 programs this data is copied in and out of storage
397 // so that the currently executing thread always has its own copy of this 397 // so that the currently executing thread always has its own copy of this
398 // data. 398 // data.
399 ISOLATED_CLASS HandleScopeImplementer { 399 ISOLATED_CLASS HandleScopeImplementer {
400 public: 400 public:
401 401
402 explicit HandleScopeImplementer(Isolate* isolate) 402 HandleScopeImplementer()
403 : isolate_(isolate), 403 : blocks_(0),
404 blocks_(0),
405 entered_contexts_(0), 404 entered_contexts_(0),
406 saved_contexts_(0), 405 saved_contexts_(0),
407 spare_(NULL), 406 spare_(NULL),
408 ignore_out_of_memory_(false), 407 ignore_out_of_memory_(false),
409 call_depth_(0) { } 408 call_depth_(0) { }
410 409
411 // Threading support for handle data. 410 // Threading support for handle data.
412 static int ArchiveSpacePerThread(); 411 static int ArchiveSpacePerThread();
413 char* RestoreThread(char* from); 412 char* RestoreThread(char* from);
414 char* ArchiveThread(char* to); 413 char* ArchiveThread(char* to);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 blocks_.Free(); 459 blocks_.Free();
461 entered_contexts_.Free(); 460 entered_contexts_.Free();
462 saved_contexts_.Free(); 461 saved_contexts_.Free();
463 if (spare_ != NULL) { 462 if (spare_ != NULL) {
464 DeleteArray(spare_); 463 DeleteArray(spare_);
465 spare_ = NULL; 464 spare_ = NULL;
466 } 465 }
467 ASSERT(call_depth_ == 0); 466 ASSERT(call_depth_ == 0);
468 } 467 }
469 468
470 Isolate* isolate_;
471 List<internal::Object**> blocks_; 469 List<internal::Object**> blocks_;
472 // Used as a stack to keep track of entered contexts. 470 // Used as a stack to keep track of entered contexts.
473 List<Handle<Object> > entered_contexts_; 471 List<Handle<Object> > entered_contexts_;
474 // Used as a stack to keep track of saved contexts. 472 // Used as a stack to keep track of saved contexts.
475 List<Context*> saved_contexts_; 473 List<Context*> saved_contexts_;
476 Object** spare_; 474 Object** spare_;
477 bool ignore_out_of_memory_; 475 bool ignore_out_of_memory_;
478 int call_depth_; 476 int call_depth_;
479 // This is only used for threading support. 477 // This is only used for threading support.
480 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; 478 v8::ImplementationUtilities::HandleScopeData handle_scope_data_;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 stress_type_ = stress_type; 563 stress_type_ = stress_type;
566 } 564 }
567 565
568 private: 566 private:
569 static v8::Testing::StressType stress_type_; 567 static v8::Testing::StressType stress_type_;
570 }; 568 };
571 569
572 } } // namespace v8::internal 570 } } // namespace v8::internal
573 571
574 #endif // V8_API_H_ 572 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698