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

Side by Side Diff: src/api.cc

Issue 1991293002: [api] Remove deprectated memory allocation callback api (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « include/v8.h ('k') | src/heap/spaces.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 7159 matching lines...) Expand 10 before | Expand all | Expand 10 after
7170 i::Isolate* isolate = i::Isolate::Current(); 7170 i::Isolate* isolate = i::Isolate::Current();
7171 isolate->heap()->AddGCEpilogueCallback( 7171 isolate->heap()->AddGCEpilogueCallback(
7172 reinterpret_cast<v8::Isolate::GCCallback>(callback), gc_type, false); 7172 reinterpret_cast<v8::Isolate::GCCallback>(callback), gc_type, false);
7173 } 7173 }
7174 7174
7175 void Isolate::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) { 7175 void Isolate::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) {
7176 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7176 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7177 isolate->heap()->SetEmbedderHeapTracer(tracer); 7177 isolate->heap()->SetEmbedderHeapTracer(tracer);
7178 } 7178 }
7179 7179
7180 void Isolate::AddMemoryAllocationCallback(MemoryAllocationCallback callback,
7181 ObjectSpace space,
7182 AllocationAction action) {
7183 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7184 isolate->heap()->memory_allocator()->AddMemoryAllocationCallback(
7185 callback, space, action);
7186 }
7187
7188
7189 void Isolate::RemoveMemoryAllocationCallback(
7190 MemoryAllocationCallback callback) {
7191 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7192 isolate->heap()->memory_allocator()->RemoveMemoryAllocationCallback(callback);
7193 }
7194
7195
7196 void Isolate::TerminateExecution() { 7180 void Isolate::TerminateExecution() {
7197 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7181 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7198 isolate->stack_guard()->RequestTerminateExecution(); 7182 isolate->stack_guard()->RequestTerminateExecution();
7199 } 7183 }
7200 7184
7201 7185
7202 bool Isolate::IsExecutionTerminating() { 7186 bool Isolate::IsExecutionTerminating() {
7203 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7187 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7204 return IsExecutionTerminatingCheck(isolate); 7188 return IsExecutionTerminatingCheck(isolate);
7205 } 7189 }
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
8798 Address callback_address = 8782 Address callback_address =
8799 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8783 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8800 VMState<EXTERNAL> state(isolate); 8784 VMState<EXTERNAL> state(isolate);
8801 ExternalCallbackScope call_scope(isolate, callback_address); 8785 ExternalCallbackScope call_scope(isolate, callback_address);
8802 callback(info); 8786 callback(info);
8803 } 8787 }
8804 8788
8805 8789
8806 } // namespace internal 8790 } // namespace internal
8807 } // namespace v8 8791 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698