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

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

Issue 2610853002: [wrapper-tracing] Enable cleanup and invalidating on WorkerBackingThread (Closed)
Patch Set: Address comment Created 3 years, 11 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 | « third_party/WebKit/Source/core/workers/WorkerBackingThread.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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 void shouldFlushHeapDoesNotContainCache() { 430 void shouldFlushHeapDoesNotContainCache() {
431 m_shouldFlushHeapDoesNotContainCache = true; 431 m_shouldFlushHeapDoesNotContainCache = true;
432 } 432 }
433 433
434 void registerTraceDOMWrappers( 434 void registerTraceDOMWrappers(
435 v8::Isolate* isolate, 435 v8::Isolate* isolate,
436 void (*traceDOMWrappers)(v8::Isolate*, Visitor*), 436 void (*traceDOMWrappers)(v8::Isolate*, Visitor*),
437 void (*invalidateDeadObjectsInWrappersMarkingDeque)(v8::Isolate*), 437 void (*invalidateDeadObjectsInWrappersMarkingDeque)(v8::Isolate*),
438 void (*performCleanup)(v8::Isolate*)) { 438 void (*performCleanup)(v8::Isolate*)) {
439 m_isolate = isolate; 439 m_isolate = isolate;
440 DCHECK(!m_isolate || traceDOMWrappers);
441 DCHECK(!m_isolate || invalidateDeadObjectsInWrappersMarkingDeque);
442 DCHECK(!m_isolate || performCleanup);
440 m_traceDOMWrappers = traceDOMWrappers; 443 m_traceDOMWrappers = traceDOMWrappers;
441 m_invalidateDeadObjectsInWrappersMarkingDeque = 444 m_invalidateDeadObjectsInWrappersMarkingDeque =
442 invalidateDeadObjectsInWrappersMarkingDeque; 445 invalidateDeadObjectsInWrappersMarkingDeque;
443 m_performCleanup = performCleanup; 446 m_performCleanup = performCleanup;
444 } 447 }
445 448
446 // By entering a gc-forbidden scope, conservative GCs will not 449 // By entering a gc-forbidden scope, conservative GCs will not
447 // be allowed while handling an out-of-line allocation request. 450 // be allowed while handling an out-of-line allocation request.
448 // Intended used when constructing subclasses of GC mixins, where 451 // Intended used when constructing subclasses of GC mixins, where
449 // the object being constructed cannot be safely traced & marked 452 // the object being constructed cannot be safely traced & marked
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 class ThreadStateFor<AnyThread> { 775 class ThreadStateFor<AnyThread> {
773 STATIC_ONLY(ThreadStateFor); 776 STATIC_ONLY(ThreadStateFor);
774 777
775 public: 778 public:
776 static ThreadState* state() { return ThreadState::current(); } 779 static ThreadState* state() { return ThreadState::current(); }
777 }; 780 };
778 781
779 } // namespace blink 782 } // namespace blink
780 783
781 #endif // ThreadState_h 784 #endif // ThreadState_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698