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

Side by Side Diff: src/runtime.cc

Issue 72813004: Fixed crashes exposed though fuzzing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits Created 7 years, 1 month 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/runtime.h ('k') | src/x64/full-codegen-x64.cc » ('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 9431 matching lines...) Expand 10 before | Expand all | Expand 10 after
9442 9442
9443 9443
9444 RUNTIME_FUNCTION(MaybeObject*, Runtime_ThrowNotDateError) { 9444 RUNTIME_FUNCTION(MaybeObject*, Runtime_ThrowNotDateError) {
9445 HandleScope scope(isolate); 9445 HandleScope scope(isolate);
9446 ASSERT(args.length() == 0); 9446 ASSERT(args.length() == 0);
9447 return isolate->Throw(*isolate->factory()->NewTypeError( 9447 return isolate->Throw(*isolate->factory()->NewTypeError(
9448 "not_date_object", HandleVector<Object>(NULL, 0))); 9448 "not_date_object", HandleVector<Object>(NULL, 0)));
9449 } 9449 }
9450 9450
9451 9451
9452 RUNTIME_FUNCTION(MaybeObject*, Runtime_ThrowMessage) {
9453 HandleScope scope(isolate);
9454 ASSERT(args.length() == 1);
9455 CONVERT_SMI_ARG_CHECKED(message_id, 0);
9456 const char* message = GetBailoutReason(
9457 static_cast<BailoutReason>(message_id));
9458 Handle<Name> message_handle =
9459 isolate->factory()->NewStringFromAscii(CStrVector(message));
9460 return isolate->Throw(*message_handle);
9461 }
9462
9452 9463
9453 RUNTIME_FUNCTION(MaybeObject*, Runtime_StackGuard) { 9464 RUNTIME_FUNCTION(MaybeObject*, Runtime_StackGuard) {
9454 SealHandleScope shs(isolate); 9465 SealHandleScope shs(isolate);
9455 ASSERT(args.length() == 0); 9466 ASSERT(args.length() == 0);
9456 9467
9457 // First check if this is a real stack overflow. 9468 // First check if this is a real stack overflow.
9458 if (isolate->stack_guard()->IsStackOverflow()) { 9469 if (isolate->stack_guard()->IsStackOverflow()) {
9459 return isolate->StackOverflow(); 9470 return isolate->StackOverflow();
9460 } 9471 }
9461 9472
(...skipping 5444 matching lines...) Expand 10 before | Expand all | Expand 10 after
14906 // Handle last resort GC and make sure to allow future allocations 14917 // Handle last resort GC and make sure to allow future allocations
14907 // to grow the heap without causing GCs (if possible). 14918 // to grow the heap without causing GCs (if possible).
14908 isolate->counters()->gc_last_resort_from_js()->Increment(); 14919 isolate->counters()->gc_last_resort_from_js()->Increment();
14909 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14920 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14910 "Runtime::PerformGC"); 14921 "Runtime::PerformGC");
14911 } 14922 }
14912 } 14923 }
14913 14924
14914 14925
14915 } } // namespace v8::internal 14926 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698