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

Side by Side Diff: src/platform.h

Issue 3135022: Give correct value ranges to enumeration types used as opaque types. (Closed)
Patch Set: fixed Created 10 years, 4 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
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // Thread 353 // Thread
354 // 354 //
355 // Thread objects are used for creating and running threads. When the start() 355 // Thread objects are used for creating and running threads. When the start()
356 // method is called the new thread starts running the run() method in the new 356 // method is called the new thread starts running the run() method in the new
357 // thread. The Thread object should not be deallocated before the thread has 357 // thread. The Thread object should not be deallocated before the thread has
358 // terminated. 358 // terminated.
359 359
360 class Thread: public ThreadHandle { 360 class Thread: public ThreadHandle {
361 public: 361 public:
362 // Opaque data type for thread-local storage keys. 362 // Opaque data type for thread-local storage keys.
363 enum LocalStorageKey {}; 363 // LOCAL_STORAGE_KEY_MIN_VALUE and LOCAL_STORAGE_KEY_MAX_VALUE are specified
364 // to ensure that enumeration type has correct value range (see Issue 830 for
365 // more details).
366 enum LocalStorageKey {
367 LOCAL_STORAGE_KEY_MIN_VALUE = kMinInt,
368 LOCAL_STORAGE_KEY_MAX_VALUE = kMaxInt
369 };
364 370
365 // Create new thread. 371 // Create new thread.
366 Thread(); 372 Thread();
367 virtual ~Thread(); 373 virtual ~Thread();
368 374
369 // Start new thread by calling the Run() method in the new thread. 375 // Start new thread by calling the Run() method in the new thread.
370 void Start(); 376 void Start();
371 377
372 // Wait until thread terminates. 378 // Wait until thread terminates.
373 void Join(); 379 void Join();
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 bool active_; 574 bool active_;
569 PlatformData* data_; // Platform specific data. 575 PlatformData* data_; // Platform specific data.
570 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 576 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
571 }; 577 };
572 578
573 #endif // ENABLE_LOGGING_AND_PROFILING 579 #endif // ENABLE_LOGGING_AND_PROFILING
574 580
575 } } // namespace v8::internal 581 } } // namespace v8::internal
576 582
577 #endif // V8_PLATFORM_H_ 583 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698