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

Side by Side Diff: src/d8.cc

Issue 6070009: Added labelled thread names to help with some debugging activity. Right now,... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 12 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 ExecuteString(String::New(*input), name, true, true); 592 ExecuteString(String::New(*input), name, true, true);
593 } 593 }
594 editor->Close(); 594 editor->Close();
595 printf("\n"); 595 printf("\n");
596 } 596 }
597 597
598 598
599 class ShellThread : public i::Thread { 599 class ShellThread : public i::Thread {
600 public: 600 public:
601 ShellThread(int no, i::Vector<const char> files) 601 ShellThread(int no, i::Vector<const char> files)
602 : no_(no), files_(files) { } 602 :
603 #ifdef DEBUG_THREAD_NAMES
604 Thread("d8:ShellThread"),
605 #endif
606 no_(no), files_(files) { }
603 virtual void Run(); 607 virtual void Run();
604 private: 608 private:
605 int no_; 609 int no_;
606 i::Vector<const char> files_; 610 i::Vector<const char> files_;
607 }; 611 };
608 612
609 613
610 void ShellThread::Run() { 614 void ShellThread::Run() {
611 // Prepare the context for this thread. 615 // Prepare the context for this thread.
612 Locker locker; 616 Locker locker;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 return 0; 778 return 0;
775 } 779 }
776 780
777 781
778 } // namespace v8 782 } // namespace v8
779 783
780 784
781 int main(int argc, char* argv[]) { 785 int main(int argc, char* argv[]) {
782 return v8::Shell::Main(argc, argv); 786 return v8::Shell::Main(argc, argv);
783 } 787 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698