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

Unified Diff: src/api.cc

Issue 1094863002: Remove the weak list of views from array buffers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 14d3a823ebf637a75322e464704085812ab6dcb5..17e9aefc3c8e6221b726673ed58d68d7d423485b 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6466,6 +6466,7 @@ size_t v8::ArrayBufferView::CopyContents(void* dest, size_t byte_length) {
source = reinterpret_cast<char*>(buffer->backing_store());
}
}
+ if (!source) return 0;
memcpy(dest, source + byte_offset, bytes_to_copy);
}
return bytes_to_copy;

Powered by Google App Engine
This is Rietveld 408576698