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

Side by Side Diff: src/api.cc

Issue 1165004: New GCCallbacks with additional parameters. (Closed)
Patch Set: Created 10 years, 9 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 | « include/v8.h ('k') | src/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3528 matching lines...) Expand 10 before | Expand all | Expand 10 after
3539 i::Heap::SetGlobalGCPrologueCallback(callback); 3539 i::Heap::SetGlobalGCPrologueCallback(callback);
3540 } 3540 }
3541 3541
3542 3542
3543 void V8::SetGlobalGCEpilogueCallback(GCCallback callback) { 3543 void V8::SetGlobalGCEpilogueCallback(GCCallback callback) {
3544 if (IsDeadCheck("v8::V8::SetGlobalGCEpilogueCallback()")) return; 3544 if (IsDeadCheck("v8::V8::SetGlobalGCEpilogueCallback()")) return;
3545 i::Heap::SetGlobalGCEpilogueCallback(callback); 3545 i::Heap::SetGlobalGCEpilogueCallback(callback);
3546 } 3546 }
3547 3547
3548 3548
3549 void V8::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) {
3550 if (IsDeadCheck("v8::V8::AddGCPrologueCallback()")) return;
3551 i::Heap::AddGCPrologueCallback(callback, gc_type);
3552 }
3553
3554
3555 void V8::RemoveGCPrologueCallback(GCPrologueCallback callback) {
3556 if (IsDeadCheck("v8::V8::RemoveGCPrologueCallback()")) return;
3557 i::Heap::RemoveGCPrologueCallback(callback);
3558 }
3559
3560
3561 void V8::AddGCEpilogueCallback(GCEpilogueCallback callback, GCType gc_type) {
3562 if (IsDeadCheck("v8::V8::AddGCEpilogueCallback()")) return;
3563 i::Heap::AddGCEpilogueCallback(callback, gc_type);
3564 }
3565
3566
3567 void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) {
3568 if (IsDeadCheck("v8::V8::RemoveGCEpilogueCallback()")) return;
3569 i::Heap::RemoveGCEpilogueCallback(callback);
3570 }
3571
3572
3549 void V8::PauseProfiler() { 3573 void V8::PauseProfiler() {
3550 #ifdef ENABLE_LOGGING_AND_PROFILING 3574 #ifdef ENABLE_LOGGING_AND_PROFILING
3551 PauseProfilerEx(PROFILER_MODULE_CPU); 3575 PauseProfilerEx(PROFILER_MODULE_CPU);
3552 #endif 3576 #endif
3553 } 3577 }
3554 3578
3555 3579
3556 void V8::ResumeProfiler() { 3580 void V8::ResumeProfiler() {
3557 #ifdef ENABLE_LOGGING_AND_PROFILING 3581 #ifdef ENABLE_LOGGING_AND_PROFILING
3558 ResumeProfilerEx(PROFILER_MODULE_CPU); 3582 ResumeProfilerEx(PROFILER_MODULE_CPU);
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
4027 4051
4028 4052
4029 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 4053 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
4030 HandleScopeImplementer* thread_local = 4054 HandleScopeImplementer* thread_local =
4031 reinterpret_cast<HandleScopeImplementer*>(storage); 4055 reinterpret_cast<HandleScopeImplementer*>(storage);
4032 thread_local->IterateThis(v); 4056 thread_local->IterateThis(v);
4033 return storage + ArchiveSpacePerThread(); 4057 return storage + ArchiveSpacePerThread();
4034 } 4058 }
4035 4059
4036 } } // namespace v8::internal 4060 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698