| OLD | NEW |
| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // the executions of mutators. | 285 // the executions of mutators. |
| 286 void makeConsistentForMutator(); | 286 void makeConsistentForMutator(); |
| 287 | 287 |
| 288 // Support for disallowing allocation. Mainly used for sanity | 288 // Support for disallowing allocation. Mainly used for sanity |
| 289 // checks asserts. | 289 // checks asserts. |
| 290 bool isAllocationAllowed() const { | 290 bool isAllocationAllowed() const { |
| 291 return !isAtSafePoint() && !m_noAllocationCount; | 291 return !isAtSafePoint() && !m_noAllocationCount; |
| 292 } | 292 } |
| 293 void enterNoAllocationScope() { m_noAllocationCount++; } | 293 void enterNoAllocationScope() { m_noAllocationCount++; } |
| 294 void leaveNoAllocationScope() { m_noAllocationCount--; } | 294 void leaveNoAllocationScope() { m_noAllocationCount--; } |
| 295 bool isWrapperTracingForbidden() { return isMixinInConstruction(); } |
| 295 bool isGCForbidden() const { | 296 bool isGCForbidden() const { |
| 296 return m_gcForbiddenCount || isMixinInConstruction(); | 297 return m_gcForbiddenCount || isMixinInConstruction(); |
| 297 } | 298 } |
| 298 void enterGCForbiddenScope() { m_gcForbiddenCount++; } | 299 void enterGCForbiddenScope() { m_gcForbiddenCount++; } |
| 299 void leaveGCForbiddenScope() { | 300 void leaveGCForbiddenScope() { |
| 300 DCHECK_GE(m_gcForbiddenCount, 0u); | 301 DCHECK_GE(m_gcForbiddenCount, 0u); |
| 301 m_gcForbiddenCount--; | 302 m_gcForbiddenCount--; |
| 302 } | 303 } |
| 303 bool isMixinInConstruction() const { return m_mixinsBeingConstructedCount; } | 304 bool isMixinInConstruction() const { return m_mixinsBeingConstructedCount; } |
| 304 void enterMixinConstructionScope() { m_mixinsBeingConstructedCount++; } | 305 void enterMixinConstructionScope() { m_mixinsBeingConstructedCount++; } |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 class ThreadStateFor<AnyThread> { | 753 class ThreadStateFor<AnyThread> { |
| 753 STATIC_ONLY(ThreadStateFor); | 754 STATIC_ONLY(ThreadStateFor); |
| 754 | 755 |
| 755 public: | 756 public: |
| 756 static ThreadState* state() { return ThreadState::current(); } | 757 static ThreadState* state() { return ThreadState::current(); } |
| 757 }; | 758 }; |
| 758 | 759 |
| 759 } // namespace blink | 760 } // namespace blink |
| 760 | 761 |
| 761 #endif // ThreadState_h | 762 #endif // ThreadState_h |
| OLD | NEW |