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

Side by Side Diff: include/v8.h

Issue 2961003: Allow to capture stack trace for uncaught exceptions (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 | « no previous file | src/api.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 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 */ 687 */
688 Handle<Value> GetScriptResourceName() const; 688 Handle<Value> GetScriptResourceName() const;
689 689
690 /** 690 /**
691 * Returns the resource data for the script from where the function causing 691 * Returns the resource data for the script from where the function causing
692 * the error originates. 692 * the error originates.
693 */ 693 */
694 Handle<Value> GetScriptData() const; 694 Handle<Value> GetScriptData() const;
695 695
696 /** 696 /**
697 * Exception stack trace. By default stack traces are not captured for
698 * uncaught exceptions. SetCaptureStackTraceForUncaughtExceptions allows
699 * to change this option.
700 */
701 Handle<StackTrace> GetStackTrace() const;
702
703 /**
697 * Returns the number, 1-based, of the line where the error occurred. 704 * Returns the number, 1-based, of the line where the error occurred.
698 */ 705 */
699 int GetLineNumber() const; 706 int GetLineNumber() const;
700 707
701 /** 708 /**
702 * Returns the index within the script of the first character where 709 * Returns the index within the script of the first character where
703 * the error occurred. 710 * the error occurred.
704 */ 711 */
705 int GetStartPosition() const; 712 int GetStartPosition() const;
706 713
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 */ 2459 */
2453 static bool AddMessageListener(MessageCallback that, 2460 static bool AddMessageListener(MessageCallback that,
2454 Handle<Value> data = Handle<Value>()); 2461 Handle<Value> data = Handle<Value>());
2455 2462
2456 /** 2463 /**
2457 * Remove all message listeners from the specified callback function. 2464 * Remove all message listeners from the specified callback function.
2458 */ 2465 */
2459 static void RemoveMessageListeners(MessageCallback that); 2466 static void RemoveMessageListeners(MessageCallback that);
2460 2467
2461 /** 2468 /**
2469 * Tells V8 to capture current stack trace when uncaught exception occurs
2470 * and report it to the message listeners. The option is off by default.
2471 */
2472 static void SetCaptureStackTraceForUncaughtExceptions(
2473 bool capture,
2474 int frame_limit = 10,
2475 StackTrace::StackTraceOptions options = StackTrace::kOverview);
2476
2477 /**
2462 * Sets V8 flags from a string. 2478 * Sets V8 flags from a string.
2463 */ 2479 */
2464 static void SetFlagsFromString(const char* str, int length); 2480 static void SetFlagsFromString(const char* str, int length);
2465 2481
2466 /** 2482 /**
2467 * Sets V8 flags from the command line. 2483 * Sets V8 flags from the command line.
2468 */ 2484 */
2469 static void SetFlagsFromCommandLine(int* argc, 2485 static void SetFlagsFromCommandLine(int* argc,
2470 char** argv, 2486 char** argv,
2471 bool remove_flags); 2487 bool remove_flags);
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3588 3604
3589 3605
3590 } // namespace v8 3606 } // namespace v8
3591 3607
3592 3608
3593 #undef V8EXPORT 3609 #undef V8EXPORT
3594 #undef TYPE_CHECK 3610 #undef TYPE_CHECK
3595 3611
3596 3612
3597 #endif // V8_H_ 3613 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698