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

Unified Diff: src/d8.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 | « src/api.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 24c89e90ae54d8420c7c659219bf01a3050ab71e..5010acb418496e2dc381777dc0416c434a83b571 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -389,7 +389,7 @@ Handle<Value> Shell::CreateExternalArrayBuffer(Isolate* isolate,
Persistent<Object>::New(isolate, buffer);
persistent_array.MakeWeak(isolate, data, ExternalArrayWeakCallback);
persistent_array.MarkIndependent(isolate);
- V8::AdjustAmountOfExternalAllocatedMemory(length);
+ isolate->AdjustAmountOfExternalAllocatedMemory(length);
buffer->SetIndexedPropertiesToExternalArrayData(
data, v8::kExternalByteArray, length);
@@ -830,7 +830,7 @@ void Shell::ExternalArrayWeakCallback(v8::Isolate* isolate,
HandleScope scope;
int32_t length =
object->ToObject()->Get(Symbols::byteLength(isolate))->Uint32Value();
- V8::AdjustAmountOfExternalAllocatedMemory(-length);
+ isolate->AdjustAmountOfExternalAllocatedMemory(-length);
delete[] static_cast<uint8_t*>(data);
object.Dispose(isolate);
}
@@ -1446,7 +1446,7 @@ Handle<Value> Shell::ReadBuffer(const Arguments& args) {
Persistent<Object>::New(isolate, buffer);
persistent_buffer.MakeWeak(isolate, data, ExternalArrayWeakCallback);
persistent_buffer.MarkIndependent(isolate);
- V8::AdjustAmountOfExternalAllocatedMemory(length);
+ isolate->AdjustAmountOfExternalAllocatedMemory(length);
buffer->SetIndexedPropertiesToExternalArrayData(
data, kExternalUnsignedByteArray, length);
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698