Changeset 1126 in webkit for trunk/JavaScriptCore/kjs/internal.cpp
- Timestamp:
- May 10, 2002, 9:41:01 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.cpp
r1024 r1126 689 689 ProgramNode *Parser::progNode = 0; 690 690 int Parser::sid = 0; 691 #ifdef APPLE_CHANGES 692 static pthread_mutex_t parserLock = {_PTHREAD_MUTEX_SIG_init, {}}; 693 #endif 691 694 692 695 ProgramNode *Parser::parse(const UChar *code, unsigned int length, int *sourceId, 693 696 int *errLine, UString *errMsg) 694 697 { 698 #ifdef APPLE_CHANGES 699 pthread_mutex_lock(&parserLock); 700 #endif 695 701 if (errLine) 696 702 *errLine = -1; … … 721 727 #endif 722 728 delete prog; 729 #ifdef APPLE_CHANGES 730 pthread_mutex_unlock(&parserLock); 731 #endif 723 732 return 0; 724 733 } 725 734 735 #ifdef APPLE_CHANGES 736 pthread_mutex_unlock(&parserLock); 737 #endif 726 738 return prog; 727 739 } … … 765 777 // add this interpreter to the global chain 766 778 // as a root set for garbage collection 779 #ifdef APPLE_CHANGES 780 Collector::lock(); 781 #endif 767 782 if (s_hook) { 768 783 prev = s_hook; … … 775 790 globalInit(); 776 791 } 792 #ifdef APPLE_CHANGES 793 Collector::unlock(); 794 #endif 777 795 778 796 m_interpreter = interp; … … 927 945 //fprintf(stderr,"InterpreterImp::clear\n"); 928 946 // remove from global chain (see init()) 947 #ifdef APPLE_CHANGES 948 Collector::lock(); 949 #endif 929 950 next->prev = prev; 930 951 prev->next = next; … … 936 957 globalClear(); 937 958 } 959 #ifdef APPLE_CHANGES 960 Collector::unlock(); 961 #endif 938 962 } 939 963
Note:
See TracChangeset
for help on using the changeset viewer.