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

Side by Side Diff: src/runtime.cc

Issue 222163002: Introduce MaybeHandle to police exception checking in handlified code. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/v8globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3220 matching lines...) Expand 10 before | Expand all | Expand 10 after
3231 Vector< Handle<Object> > argv = HandleVector<Object>(NULL, 0); 3231 Vector< Handle<Object> > argv = HandleVector<Object>(NULL, 0);
3232 Handle<Object> error = isolate->factory()->NewError(message, argv); 3232 Handle<Object> error = isolate->factory()->NewError(message, argv);
3233 return isolate->Throw(*error); 3233 return isolate->Throw(*error);
3234 } 3234 }
3235 3235
3236 3236
3237 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObjectFreeze) { 3237 RUNTIME_FUNCTION(MaybeObject*, Runtime_ObjectFreeze) {
3238 HandleScope scope(isolate); 3238 HandleScope scope(isolate);
3239 ASSERT(args.length() == 1); 3239 ASSERT(args.length() == 1);
3240 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); 3240 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
3241 Handle<Object> result = JSObject::Freeze(object); 3241 Handle<Object> result;
3242 RETURN_IF_EMPTY_HANDLE(isolate, result); 3242 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, JSObject::Freeze(object));
3243 return *result; 3243 return *result;
3244 } 3244 }
3245 3245
3246 3246
3247 MUST_USE_RESULT static MaybeObject* CharFromCode(Isolate* isolate, 3247 MUST_USE_RESULT static MaybeObject* CharFromCode(Isolate* isolate,
3248 Object* char_code) { 3248 Object* char_code) {
3249 if (char_code->IsNumber()) { 3249 if (char_code->IsNumber()) {
3250 return isolate->heap()->LookupSingleCharacterStringFromCode( 3250 return isolate->heap()->LookupSingleCharacterStringFromCode(
3251 NumberToUint32(char_code) & 0xffff); 3251 NumberToUint32(char_code) & 0xffff);
3252 } 3252 }
(...skipping 11978 matching lines...) Expand 10 before | Expand all | Expand 10 after
15231 } 15231 }
15232 } 15232 }
15233 15233
15234 15234
15235 void Runtime::OutOfMemory() { 15235 void Runtime::OutOfMemory() {
15236 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); 15236 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true);
15237 UNREACHABLE(); 15237 UNREACHABLE();
15238 } 15238 }
15239 15239
15240 } } // namespace v8::internal 15240 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698