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

Unified Diff: src/factory.cc

Issue 200363002: Handlify callers of Object::GetElement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments 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/builtins.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 6f86647ef5911348cda4fa55bb590e39d4334b27..348c08965fed3f554f64ef672e02872018d08111 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1116,8 +1116,9 @@ Handle<String> Factory::EmergencyNewError(const char* message,
*p++ = ' ';
space--;
if (space > 0) {
- MaybeObject* maybe_arg = args->GetElement(isolate(), i);
- Handle<String> arg_str(reinterpret_cast<String*>(maybe_arg));
+ Handle<String> arg_str = Handle<String>::cast(
+ Object::GetElement(isolate(), args, i));
+ CHECK_NOT_EMPTY_HANDLE(isolate(), arg_str);
SmartArrayPointer<char> arg = arg_str->ToCString();
Vector<char> v2(p, static_cast<int>(space));
OS::StrNCpy(v2, arg.get(), space);
« no previous file with comments | « src/builtins.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698