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

Side by Side Diff: src/execution.cc

Issue 12901: Reporting uncaught errors at the boundary between C++ and JS instead of tryin... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 #ifdef DEBUG 90 #ifdef DEBUG
91 value->Verify(); 91 value->Verify();
92 #endif 92 #endif
93 93
94 // Update the pending exception flag and return the value. 94 // Update the pending exception flag and return the value.
95 *has_pending_exception = value->IsException(); 95 *has_pending_exception = value->IsException();
96 ASSERT(*has_pending_exception == Top::has_pending_exception()); 96 ASSERT(*has_pending_exception == Top::has_pending_exception());
97 if (*has_pending_exception) { 97 if (*has_pending_exception) {
98 Top::ReportPendingMessages();
99 return Handle<Object>();
100 } else {
101 Top::clear_pending_message();
Søren Thygesen Gjesse 2008/12/04 07:53:53 If there is no pending exception clearing it shoul
olehougaard 2008/12/04 08:44:35 Removed.
98 Top::setup_external_caught(); 102 Top::setup_external_caught();
Mads Ager (chromium) 2008/12/03 15:44:48 Why is setup_external_caught needed in the case th
olehougaard 2008/12/04 08:44:35 It isn't. Removed.
99 // If the pending exception is OutOfMemoryException set out_of_memory in
100 // the global context. Note: We have to mark the global context here
101 // since the GenerateThrowOutOfMemory stub cannot make a RuntimeCall to
102 // set it.
103 if (Top::pending_exception() == Failure::OutOfMemoryException()) {
104 Top::context()->mark_out_of_memory();
105 }
106 return Handle<Object>();
107 } 103 }
108 104
109 return Handle<Object>(value); 105 return Handle<Object>(value);
110 } 106 }
111 107
112 108
113 Handle<Object> Execution::Call(Handle<JSFunction> func, 109 Handle<Object> Execution::Call(Handle<JSFunction> func,
114 Handle<Object> receiver, 110 Handle<Object> receiver,
115 int argc, 111 int argc,
116 Object*** args, 112 Object*** args,
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // All allocation spaces other than NEW_SPACE have the same effect. 516 // All allocation spaces other than NEW_SPACE have the same effect.
521 Heap::CollectGarbage(0, OLD_DATA_SPACE); 517 Heap::CollectGarbage(0, OLD_DATA_SPACE);
522 return v8::Undefined(); 518 return v8::Undefined();
523 } 519 }
524 520
525 521
526 static GCExtension kGCExtension; 522 static GCExtension kGCExtension;
527 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); 523 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension);
528 524
529 } } // namespace v8::internal 525 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698