| OLD | NEW |
| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMMajorGC"); | 272 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMMajorGC"); |
| 273 objectGroupingForMajorGC(isolate, constructRetainedObjectInfos); | 273 objectGroupingForMajorGC(isolate, constructRetainedObjectInfos); |
| 274 } | 274 } |
| 275 V8PerIsolateData::from(isolate)->setPreviousSamplingState(TRACE_EVENT_GE
T_SAMPLING_STATE()); | 275 V8PerIsolateData::from(isolate)->setPreviousSamplingState(TRACE_EVENT_GE
T_SAMPLING_STATE()); |
| 276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8MajorGC"); | 276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8MajorGC"); |
| 277 } else { | 277 } else { |
| 278 objectGroupingForMajorGC(isolate, constructRetainedObjectInfos); | 278 objectGroupingForMajorGC(isolate, constructRetainedObjectInfos); |
| 279 } | 279 } |
| 280 } | 280 } |
| 281 | 281 |
| 282 } | 282 } // namespace |
| 283 | 283 |
| 284 void V8GCController::gcPrologue(v8::Isolate* isolate, v8::GCType type, v8::GCCal
lbackFlags flags) | 284 void V8GCController::gcPrologue(v8::Isolate* isolate, v8::GCType type, v8::GCCal
lbackFlags flags) |
| 285 { | 285 { |
| 286 if (isMainThread()) | 286 if (isMainThread()) |
| 287 ScriptForbiddenScope::enter(); | 287 ScriptForbiddenScope::enter(); |
| 288 | 288 |
| 289 // TODO(haraken): A GC callback is not allowed to re-enter V8. This means | 289 // TODO(haraken): A GC callback is not allowed to re-enter V8. This means |
| 290 // that it's unsafe to run Oilpan's GC in the GC callback because it may | 290 // that it's unsafe to run Oilpan's GC in the GC callback because it may |
| 291 // run finalizers that call into V8. To avoid the risk, we should post | 291 // run finalizers that call into V8. To avoid the risk, we should post |
| 292 // a task to schedule the Oilpan's GC. | 292 // a task to schedule the Oilpan's GC. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 Visitor* m_visitor; | 453 Visitor* m_visitor; |
| 454 }; | 454 }; |
| 455 | 455 |
| 456 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) | 456 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) |
| 457 { | 457 { |
| 458 DOMWrapperTracer tracer(visitor); | 458 DOMWrapperTracer tracer(visitor); |
| 459 isolate->VisitHandlesWithClassIds(&tracer); | 459 isolate->VisitHandlesWithClassIds(&tracer); |
| 460 } | 460 } |
| 461 | 461 |
| 462 } // namespace blink | 462 } // namespace blink |
| OLD | NEW |