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

Unified Diff: src/d8.cc

Issue 14908004: add weakcallback without persistent copying (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: missed some instances Created 7 years, 8 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/d8.h ('k') | src/global-handles.h » ('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 0cd965f44794b8258f7764dbee2cc0221e3e2263..e95240ae8407e26bdb3ff927c4550bd11f6cf86f 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1062,14 +1062,14 @@ Handle<Value> Shell::ArraySet(const Arguments& args) {
void Shell::ExternalArrayWeakCallback(v8::Isolate* isolate,
- Persistent<Value> object,
- void* data) {
+ Persistent<Object>* object,
+ uint8_t* data) {
HandleScope scope(isolate);
- int32_t length = object->ToObject()->Get(
+ int32_t length = (*object)->Get(
PerIsolateData::byteLength_string(isolate))->Uint32Value();
isolate->AdjustAmountOfExternalAllocatedMemory(-length);
- delete[] static_cast<uint8_t*>(data);
- object.Dispose(isolate);
+ delete[] data;
+ object->Dispose(isolate);
}
« no previous file with comments | « src/d8.h ('k') | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698