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

Side by Side Diff: runtime/vm/isolate.cc

Issue 376053003: Do not notify debugger on stack overflow (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 | « runtime/vm/exceptions.cc ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 return (I == Isolate::Current()); 338 return (I == Isolate::Current());
339 } 339 }
340 340
341 341
342 bool IsolateMessageHandler::ProcessUnhandledException( 342 bool IsolateMessageHandler::ProcessUnhandledException(
343 const Object& message, const Error& result) { 343 const Object& message, const Error& result) {
344 if (result.IsUnhandledException()) { 344 if (result.IsUnhandledException()) {
345 // Invoke the isolate's uncaught exception handler, if it exists. 345 // Invoke the isolate's uncaught exception handler, if it exists.
346 const UnhandledException& error = UnhandledException::Cast(result); 346 const UnhandledException& error = UnhandledException::Cast(result);
347 RawInstance* exception = error.exception(); 347 RawInstance* exception = error.exception();
348 if ((exception == I->object_store()->out_of_memory()) ||
349 (exception == I->object_store()->stack_overflow())) {
350 // We didn't notify the debugger when the stack was full. Do it now.
351 // TODO(hausner): uncomment the debugger notification once debuggers
352 // can deal with exceptions thrown on an empty stack.
353 // I->debugger()->SignalExceptionThrown(Instance::Handle(exception));
354 }
348 if ((exception != I->object_store()->out_of_memory()) && 355 if ((exception != I->object_store()->out_of_memory()) &&
349 (exception != I->object_store()->stack_overflow())) { 356 (exception != I->object_store()->stack_overflow())) {
350 if (UnhandledExceptionCallbackHandler(message, error)) { 357 if (UnhandledExceptionCallbackHandler(message, error)) {
351 return true; 358 return true;
352 } 359 }
353 } 360 }
354 } 361 }
355 362
356 // Invoke the isolate's unhandled exception callback if there is one. 363 // Invoke the isolate's unhandled exception callback if there is one.
357 if (Isolate::UnhandledExceptionCallback() != NULL) { 364 if (Isolate::UnhandledExceptionCallback() != NULL) {
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 return func.raw(); 1388 return func.raw();
1382 } 1389 }
1383 1390
1384 1391
1385 void IsolateSpawnState::Cleanup() { 1392 void IsolateSpawnState::Cleanup() {
1386 SwitchIsolateScope switch_scope(I); 1393 SwitchIsolateScope switch_scope(I);
1387 Dart::ShutdownIsolate(); 1394 Dart::ShutdownIsolate();
1388 } 1395 }
1389 1396
1390 } // namespace dart 1397 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698