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

Unified Diff: src/objects.cc

Issue 18843002: Add Type::cast (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/types.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 8147106aaab168b8bbfa825f92ee5c310ace1359..a148c21e76d1901b2fa3b86cf6ca44fd059df968 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -15865,8 +15865,8 @@ MaybeObject* PropertyCell::SetValueInferType(Object* value,
&PropertyCell::UpdateType,
Handle<PropertyCell>(this),
Handle<Object>(value, GetIsolate()));
- if (maybe_type->IsFailure()) return maybe_type;
- Type* new_type = static_cast<Type*>(maybe_type);
+ Type* new_type;
+ if (maybe_type->To(&new_type)) return maybe_type;
set_type(new_type);
}
return value;
« no previous file with comments | « no previous file | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698