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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8MajorGC"); | 274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8MajorGC"); |
275 } else { | 275 } else { |
276 objectGroupingForMajorGC(isolate, constructRetainedObjectInfos); | 276 objectGroupingForMajorGC(isolate, constructRetainedObjectInfos); |
277 } | 277 } |
278 } | 278 } |
279 | 279 |
280 } | 280 } |
281 | 281 |
282 void V8GCController::gcPrologue(v8::Isolate* isolate, v8::GCType type, v8::GCCal
lbackFlags flags) | 282 void V8GCController::gcPrologue(v8::Isolate* isolate, v8::GCType type, v8::GCCal
lbackFlags flags) |
283 { | 283 { |
284 if (isMainThread()) { | 284 if (isMainThread()) |
285 ScriptForbiddenScope::enter(); | 285 ScriptForbiddenScope::enter(); |
286 } | |
287 | 286 |
288 // TODO(haraken): It is not safe to run finalizers in a prologue callback | 287 // TODO(haraken): It is not safe to run finalizers in a prologue callback |
289 // because V8AbstractEventListener's destructor cann call into V8. We | 288 // because V8AbstractEventListener's destructor cann call into V8. We |
290 // should post a task to schedule willStartV8GC() and avoid running it | 289 // should post a task to schedule willStartV8GC() and avoid running it |
291 // inside the prologue callback. | 290 // inside the prologue callback. |
292 // if (ThreadState::current()) | 291 // if (ThreadState::current()) |
293 // ThreadState::current()->willStartV8GC(); | 292 // ThreadState::current()->willStartV8GC(); |
294 | 293 |
295 v8::HandleScope scope(isolate); | 294 v8::HandleScope scope(isolate); |
296 switch (type) { | 295 switch (type) { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 Visitor* m_visitor; | 443 Visitor* m_visitor; |
445 }; | 444 }; |
446 | 445 |
447 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) | 446 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) |
448 { | 447 { |
449 DOMWrapperTracer tracer(visitor); | 448 DOMWrapperTracer tracer(visitor); |
450 v8::V8::VisitHandlesWithClassIds(isolate, &tracer); | 449 v8::V8::VisitHandlesWithClassIds(isolate, &tracer); |
451 } | 450 } |
452 | 451 |
453 } // namespace blink | 452 } // namespace blink |
OLD | NEW |