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

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

Issue 2532133003: [wrapper-tracing] CHECK against isWrapperTracingForbidden instead of isGCForbidden (Closed)
Patch Set: Relax check since we actually only have to worry about mixin ctors Created 4 years 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 | « third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp ('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 /* 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698