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

Side by Side Diff: Source/bindings/core/v8/V8GCController.cpp

Issue 1171423002: Oilpan: V8 major GC should schedule an idle GC if IDLE_GC is enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // (2) X's DOM wrapper is created. 437 // (2) X's DOM wrapper is created.
438 // (3) The DOM wrapper becomes unreachable. 438 // (3) The DOM wrapper becomes unreachable.
439 // (4) V8 triggers a GC. The V8's GC collects the DOM wrapper. 439 // (4) V8 triggers a GC. The V8's GC collects the DOM wrapper.
440 // However, X is not collected until a next Oilpan's GC is 440 // However, X is not collected until a next Oilpan's GC is
441 // triggered. 441 // triggered.
442 // (5) If a lot of such DOM objects are created, we end up with 442 // (5) If a lot of such DOM objects are created, we end up with
443 // a situation where V8's GC collects the DOM wrappers but 443 // a situation where V8's GC collects the DOM wrappers but
444 // the DOM objects are not collected forever. (Note that 444 // the DOM objects are not collected forever. (Note that
445 // Oilpan's GC is not triggered unless Oilpan's heap gets full.) 445 // Oilpan's GC is not triggered unless Oilpan's heap gets full.)
446 // (6) V8 hits OOM. 446 // (6) V8 hits OOM.
447 #if ENABLE(OILPAN) 447 #if ENABLE(IDLE_GC)
448 ThreadState::current()->scheduleIdleGC(); 448 ThreadState::current()->scheduleIdleGC();
449 #else 449 #else
450 ThreadState::current()->schedulePreciseGC(); 450 ThreadState::current()->schedulePreciseGC();
451 #endif 451 #endif
452 } 452 }
453 } 453 }
454 454
455 void V8GCController::collectGarbage(v8::Isolate* isolate) 455 void V8GCController::collectGarbage(v8::Isolate* isolate)
456 { 456 {
457 v8::HandleScope handleScope(isolate); 457 v8::HandleScope handleScope(isolate);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 Visitor* m_visitor; 497 Visitor* m_visitor;
498 }; 498 };
499 499
500 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) 500 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor)
501 { 501 {
502 DOMWrapperTracer tracer(visitor); 502 DOMWrapperTracer tracer(visitor);
503 v8::V8::VisitHandlesWithClassIds(isolate, &tracer); 503 v8::V8::VisitHandlesWithClassIds(isolate, &tracer);
504 } 504 }
505 505
506 } // namespace blink 506 } // namespace blink
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