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

Side by Side Diff: Source/platform/heap/ThreadState.h

Issue 1000493003: Oilpan: fix gcc compilation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switch to a static_assert() Created 5 years, 9 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 | 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 ASSERT(!m_preFinalizers.contains(&target)); 536 ASSERT(!m_preFinalizers.contains(&target));
537 ASSERT(!sweepForbidden()); 537 ASSERT(!sweepForbidden());
538 m_preFinalizers.add(&target, &T::invokePreFinalizer); 538 m_preFinalizers.add(&target, &T::invokePreFinalizer);
539 } 539 }
540 540
541 // Cancel above requests. The argument should be |*this|. This function is 541 // Cancel above requests. The argument should be |*this|. This function is
542 // ignored if it is called in pre-finalizer functions. 542 // ignored if it is called in pre-finalizer functions.
543 template<typename T> 543 template<typename T>
544 void unregisterPreFinalizer(T& target) 544 void unregisterPreFinalizer(T& target)
545 { 545 {
546 static_assert(sizeof(&T::invokePreFinalizer) > 0, "Declaration of USING_ PRE_FINALIZER()'s prefinalizer trampoline not in scope.");
546 checkThread(); 547 checkThread();
547 ASSERT(&T::invokePreFinalizer);
548 unregisterPreFinalizerInternal(&target); 548 unregisterPreFinalizerInternal(&target);
549 } 549 }
550 550
551 Vector<PageMemoryRegion*>& allocatedRegionsSinceLastGC() { return m_allocate dRegionsSinceLastGC; } 551 Vector<PageMemoryRegion*>& allocatedRegionsSinceLastGC() { return m_allocate dRegionsSinceLastGC; }
552 552
553 void shouldFlushHeapDoesNotContainCache() { m_shouldFlushHeapDoesNotContainC ache = true; } 553 void shouldFlushHeapDoesNotContainCache() { m_shouldFlushHeapDoesNotContainC ache = true; }
554 554
555 void registerTraceDOMWrappers(v8::Isolate* isolate, void (*traceDOMWrappers) (v8::Isolate*, Visitor*)) 555 void registerTraceDOMWrappers(v8::Isolate* isolate, void (*traceDOMWrappers) (v8::Isolate*, Visitor*))
556 { 556 {
557 m_isolate = isolate; 557 m_isolate = isolate;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 }; 756 };
757 757
758 template<> class ThreadStateFor<AnyThread> { 758 template<> class ThreadStateFor<AnyThread> {
759 public: 759 public:
760 static ThreadState* state() { return ThreadState::current(); } 760 static ThreadState* state() { return ThreadState::current(); }
761 }; 761 };
762 762
763 } // namespace blink 763 } // namespace blink
764 764
765 #endif // ThreadState_h 765 #endif // ThreadState_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698