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

Unified Diff: runtime/vm/object.cc

Issue 544573003: Forward heap space argument in String and Integer::New* (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add two more occurrences. Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 742cbdf5b6dff1715c7e322302de750934aad38a..904ef3326401ff2be3d4cb558f18b88c6084526e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -15440,7 +15440,7 @@ RawInteger* Integer::New(int64_t value, Heap::Space space, const bool silent) {
!IsJavascriptInt(value)) {
const Integer& i = is_smi ?
Integer::Handle(Smi::New(static_cast<intptr_t>(value))) :
- Integer::Handle(Mint::New(value));
+ Integer::Handle(Mint::New(value, space));
ThrowJavascriptIntegerOverflow(i);
}
if (is_smi) {
@@ -15454,12 +15454,12 @@ RawInteger* Integer::NewFromUint64(uint64_t value, Heap::Space space) {
if (value > static_cast<uint64_t>(Mint::kMaxValue)) {
if (FLAG_throw_on_javascript_int_overflow) {
const Integer &i =
- Integer::Handle(BigintOperations::NewFromUint64(value));
+ Integer::Handle(BigintOperations::NewFromUint64(value, space));
ThrowJavascriptIntegerOverflow(i);
}
- return BigintOperations::NewFromUint64(value);
+ return BigintOperations::NewFromUint64(value, space);
} else {
- return Integer::New(value);
+ return Integer::New(value, space);
}
}
@@ -16983,7 +16983,8 @@ RawString* String::SubString(const String& str,
if (begin_index >= str.Length()) {
return String::null();
}
- return String::SubString(str, begin_index, (str.Length() - begin_index));
+ return String::SubString(str, begin_index, (str.Length() - begin_index),
Vyacheslav Egorov (Google) 2014/09/04 15:37:26 I usually reformat such call sites as argument-per
jgruber1 2014/09/04 15:40:57 Done.
+ space);
Ivan Posva 2014/09/04 15:37:07 All arguments on a new line, please.
jgruber1 2014/09/04 15:40:57 Done.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698