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

Unified Diff: src/objects.cc

Issue 254763007: Introduce DisallowDeoptimization scope. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 6 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/assert-scope.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 38409d1d024d483e4c1fa383a23aecd5008f95bf..98e043671175e6e1f3708d478fa651ae4ac89842 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2781,6 +2781,7 @@ MaybeHandle<Map> Map::CurrentMapForDeprecated(Handle<Map> map) {
// static
MaybeHandle<Map> Map::CurrentMapForDeprecatedInternal(Handle<Map> old_map) {
DisallowHeapAllocation no_allocation;
+ DisallowDeoptimization no_deoptimization(old_map->GetIsolate());
if (!old_map->is_deprecated()) return old_map;
@@ -3940,7 +3941,9 @@ void JSObject::MigrateInstance(Handle<JSObject> object) {
// static
bool JSObject::TryMigrateInstance(Handle<JSObject> object) {
- Handle<Map> original_map(object->map());
+ Isolate* isolate = object->GetIsolate();
+ DisallowDeoptimization no_deoptimization(isolate);
+ Handle<Map> original_map(object->map(), isolate);
Handle<Map> new_map;
if (!Map::CurrentMapForDeprecatedInternal(original_map).ToHandle(&new_map)) {
return false;
« no previous file with comments | « src/assert-scope.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698