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

Unified Diff: src/api.cc

Issue 12790004: Made AdjustAmountOfExternalAllocatedMemory an instance method of Isolate (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 4ec3936be557e3d9df1d7ace82417e99316b2453..94418107e8f4c3c9aa278a6872e21fbd39e0a282 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5783,14 +5783,21 @@ void V8::AddImplicitReferences(Persistent<Object> parent,
}
+intptr_t Isolate::AdjustAmountOfExternalAllocatedMemory(
+ intptr_t change_in_bytes) {
+ i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap();
+ return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes);
+}
+
+
intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) {
i::Isolate* isolate = i::Isolate::UncheckedCurrent();
if (isolate == NULL || !isolate->IsInitialized() ||
IsDeadCheck(isolate, "v8::V8::AdjustAmountOfExternalAllocatedMemory()")) {
return 0;
}
- return isolate->heap()->AdjustAmountOfExternalAllocatedMemory(
- change_in_bytes);
+ Isolate* isolate_ext = reinterpret_cast<Isolate*>(isolate);
+ return isolate_ext->AdjustAmountOfExternalAllocatedMemory(change_in_bytes);
}
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698