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

Side by Side Diff: src/execution.cc

Issue 6528050: Make OutOfMemory exception thrown from JS call into FatalProcessOutOfMemory as well. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Following Mads' advice Created 9 years, 10 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 | « no previous file | 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 #ifdef DEBUG 100 #ifdef DEBUG
101 value->Verify(); 101 value->Verify();
102 #endif 102 #endif
103 103
104 // Update the pending exception flag and return the value. 104 // Update the pending exception flag and return the value.
105 *has_pending_exception = value->IsException(); 105 *has_pending_exception = value->IsException();
106 ASSERT(*has_pending_exception == Top::has_pending_exception()); 106 ASSERT(*has_pending_exception == Top::has_pending_exception());
107 if (*has_pending_exception) { 107 if (*has_pending_exception) {
108 Top::ReportPendingMessages(); 108 Top::ReportPendingMessages();
109 if (Top::pending_exception() == Failure::OutOfMemoryException()) {
110 if (!HandleScopeImplementer::instance()->ignore_out_of_memory()) {
111 V8::FatalProcessOutOfMemory("JS", true);
112 }
113 }
109 return Handle<Object>(); 114 return Handle<Object>();
110 } else { 115 } else {
111 Top::clear_pending_message(); 116 Top::clear_pending_message();
112 } 117 }
113 118
114 return Handle<Object>(value->ToObjectUnchecked()); 119 return Handle<Object>(value->ToObjectUnchecked());
115 } 120 }
116 121
117 122
118 Handle<Object> Execution::Call(Handle<JSFunction> func, 123 Handle<Object> Execution::Call(Handle<JSFunction> func,
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 return Top::TerminateExecution(); 726 return Top::TerminateExecution();
722 } 727 }
723 if (StackGuard::IsInterrupted()) { 728 if (StackGuard::IsInterrupted()) {
724 StackGuard::Continue(INTERRUPT); 729 StackGuard::Continue(INTERRUPT);
725 return Top::StackOverflow(); 730 return Top::StackOverflow();
726 } 731 }
727 return Heap::undefined_value(); 732 return Heap::undefined_value();
728 } 733 }
729 734
730 } } // namespace v8::internal 735 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698