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

Unified Diff: src/hydrogen.cc

Issue 251683003: Fix CurrentMapForDeprecated() to return MaybeHandle instead of a null handle. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Mark functions that return MaybeHandle with V8_WARN_UNUSED_RESULT. 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/ast.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 4c02c90bd82dcc2a4f9d0d71bc2947c873a8da09..76360c5dfb71d7607f6e80c61316baa4247189c3 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5017,9 +5017,9 @@ static bool CanInlinePropertyAccess(Type* type) {
static bool IsFastLiteral(Handle<JSObject> boilerplate,
int max_depth,
int* max_properties) {
- if (boilerplate->map()->is_deprecated()) {
- Handle<Object> result = JSObject::TryMigrateInstance(boilerplate);
- if (result.is_null()) return false;
+ if (boilerplate->map()->is_deprecated() &&
+ !JSObject::TryMigrateInstance(boilerplate)) {
+ return false;
}
ASSERT(max_depth >= 0 && *max_properties >= 0);
« no previous file with comments | « src/ast.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698