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

Unified Diff: src/runtime.cc

Issue 14149009: Fix debug print and wrong handle dereference in es6 typed array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/objects-printer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 2a34b84c3674ce77afe441d96f71886b547aa045..c0213d2ea477ab78ec7a77c4404e7a09ea4e8429 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -706,9 +706,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ArrayBufferInitialize) {
holder->set_byte_length(byte_length);
v8::Isolate* external_isolate = reinterpret_cast<v8::Isolate*>(isolate);
- v8::Handle<Object> external_holder(*holder);
- Persistent<Object> weak_handle = Persistent<Object>::New(
- external_isolate, external_holder);
+ v8::Persistent<v8::Value> weak_handle = v8::Persistent<v8::Value>::New(
+ external_isolate, v8::Utils::ToLocal(Handle<Object>::cast(holder)));
weak_handle.MakeWeak(external_isolate, data, ArrayBufferWeakCallback);
weak_handle.MarkIndependent(external_isolate);
isolate->heap()->AdjustAmountOfExternalAllocatedMemory(allocated_length);
@@ -734,8 +733,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ArrayBufferSliceImpl) {
size_t start = static_cast<size_t>(first);
size_t target_length = NumberToSize(isolate, target->byte_length());
- if (target_length == 0)
- return isolate->heap()->undefined_value();
+ if (target_length == 0) return isolate->heap()->undefined_value();
ASSERT(NumberToSize(isolate, source->byte_length()) - target_length >= start);
uint8_t* source_data = reinterpret_cast<uint8_t*>(source->backing_store());
« no previous file with comments | « src/objects-printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698