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

Unified Diff: src/api.cc

Issue 3499001: Fix more GC unsafe places (Closed)
Patch Set: fix Vitaly's comment Created 10 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 | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 91ecc41486466e06db4e57d6743e9914a1ca74db..5f480c9073fac29c43ed90b0e7f84f01ea155ad8 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2658,8 +2658,9 @@ void v8::Object::SetIndexedPropertiesToPixelData(uint8_t* data, int length) {
return;
}
i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data);
- self->set_map(
- *i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map())));
+ i::Handle<i::Map> slow_map =
+ i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map()));
+ self->set_map(*slow_map);
self->set_elements(*pixels);
}
@@ -2713,8 +2714,9 @@ void v8::Object::SetIndexedPropertiesToExternalArrayData(
}
i::Handle<i::ExternalArray> array =
i::Factory::NewExternalArray(length, array_type, data);
- self->set_map(
- *i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map())));
+ i::Handle<i::Map> slow_map =
+ i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map()));
+ self->set_map(*slow_map);
self->set_elements(*array);
}
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698