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

Side by Side Diff: src/runtime.cc

Issue 7029028: Fix incorrect coercion of other failures to Failure::Exception in ReThrow. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 (prototype->IsJSObject() || prototype->IsJSProxy()) ? prototype 596 (prototype->IsJSObject() || prototype->IsJSProxy()) ? prototype
597 : isolate->heap()->null_value(); 597 : isolate->heap()->null_value();
598 return isolate->heap()->AllocateJSProxy(handler, used_prototype); 598 return isolate->heap()->AllocateJSProxy(handler, used_prototype);
599 } 599 }
600 600
601 601
602 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateCatchExtensionObject) { 602 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateCatchExtensionObject) {
603 ASSERT(args.length() == 2); 603 ASSERT(args.length() == 2);
604 CONVERT_CHECKED(String, key, args[0]); 604 CONVERT_CHECKED(String, key, args[0]);
605 Object* value = args[1]; 605 Object* value = args[1];
606 ASSERT(!value->IsFailure());
606 // Create a catch context extension object. 607 // Create a catch context extension object.
607 JSFunction* constructor = 608 JSFunction* constructor =
608 isolate->context()->global_context()-> 609 isolate->context()->global_context()->
609 context_extension_function(); 610 context_extension_function();
610 Object* object; 611 Object* object;
611 { MaybeObject* maybe_object = isolate->heap()->AllocateJSObject(constructor); 612 { MaybeObject* maybe_object = isolate->heap()->AllocateJSObject(constructor);
612 if (!maybe_object->ToObject(&object)) return maybe_object; 613 if (!maybe_object->ToObject(&object)) return maybe_object;
613 } 614 }
614 // Assign the exception value to the catch variable and make sure 615 // Assign the exception value to the catch variable and make sure
615 // that the catch variable is DontDelete. 616 // that the catch variable is DontDelete.
(...skipping 11599 matching lines...) Expand 10 before | Expand all | Expand 10 after
12215 } else { 12216 } else {
12216 // Handle last resort GC and make sure to allow future allocations 12217 // Handle last resort GC and make sure to allow future allocations
12217 // to grow the heap without causing GCs (if possible). 12218 // to grow the heap without causing GCs (if possible).
12218 isolate->counters()->gc_last_resort_from_js()->Increment(); 12219 isolate->counters()->gc_last_resort_from_js()->Increment();
12219 isolate->heap()->CollectAllGarbage(false); 12220 isolate->heap()->CollectAllGarbage(false);
12220 } 12221 }
12221 } 12222 }
12222 12223
12223 12224
12224 } } // namespace v8::internal 12225 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698