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

Unified Diff: src/runtime.cc

Issue 206223003: JSArray::SetContent() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 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/objects-inl.h ('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 cc7942f0b427b70f0e413b188c16f6739a14d80e..f84f3d825c54b59e968e8681d81e1ec7b2a07db9 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -3289,8 +3289,7 @@ class FixedArrayBuilder {
}
Handle<JSArray> ToJSArray(Handle<JSArray> target_array) {
- Factory* factory = target_array->GetIsolate()->factory();
- factory->SetContent(target_array, array_);
+ JSArray::SetContent(target_array, array_);
target_array->set_length(Smi::FromInt(length_));
return target_array;
}
@@ -4566,7 +4565,7 @@ static MaybeObject* SearchRegExpMultiple(
Handle<FixedArray> cached_fixed_array =
Handle<FixedArray>(FixedArray::cast(*cached_answer));
// The cache FixedArray is a COW-array and can therefore be reused.
- isolate->factory()->SetContent(result_array, cached_fixed_array);
+ JSArray::SetContent(result_array, cached_fixed_array);
// The actual length of the result array is stored in the last element of
// the backing store (the backing FixedArray may have a larger capacity).
Object* cached_fixed_array_last_element =
@@ -9684,8 +9683,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DateCacheVersion) {
// Return result as a JS array.
Handle<JSObject> result =
isolate->factory()->NewJSObject(isolate->array_function());
- isolate->factory()->SetContent(Handle<JSArray>::cast(result),
- date_cache_version);
+ JSArray::SetContent(Handle<JSArray>::cast(result), date_cache_version);
return *result;
}
@@ -12961,7 +12959,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugGetLoadedScripts) {
// Return result as a JS array.
Handle<JSObject> result =
isolate->factory()->NewJSObject(isolate->array_function());
- isolate->factory()->SetContent(Handle<JSArray>::cast(result), instances);
+ JSArray::SetContent(Handle<JSArray>::cast(result), instances);
return *result;
}
@@ -13091,7 +13089,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugReferencedBy) {
isolate->context()->native_context()->array_function());
Handle<JSObject> result = isolate->factory()->NewJSObject(constructor);
- isolate->factory()->SetContent(Handle<JSArray>::cast(result), instances);
+ JSArray::SetContent(Handle<JSArray>::cast(result), instances);
return *result;
}
@@ -13169,7 +13167,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugConstructedBy) {
Handle<JSFunction> array_function(
isolate->context()->native_context()->array_function());
Handle<JSObject> result = isolate->factory()->NewJSObject(array_function);
- isolate->factory()->SetContent(Handle<JSArray>::cast(result), instances);
+ JSArray::SetContent(Handle<JSArray>::cast(result), instances);
return *result;
}
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698