| Index: src/debug/debug.h
|
| diff --git a/src/debug/debug.h b/src/debug/debug.h
|
| index 44ea4fcd0a7731a07110c1c0c04ba12d8a09bcf1..1fe39747b4e934ae56885c61e58119cc24419d3f 100644
|
| --- a/src/debug/debug.h
|
| +++ b/src/debug/debug.h
|
| @@ -598,6 +598,7 @@ class Debug {
|
| bool in_debug_event_listener_;
|
| bool break_on_exception_;
|
| bool break_on_uncaught_exception_;
|
| + bool break_in_nondebuggable_;
|
|
|
| DebugInfoListNode* debug_info_list_; // List of active debug info objects.
|
|
|
| @@ -663,6 +664,7 @@ class Debug {
|
| friend class DisableBreak;
|
| friend class LiveEdit;
|
| friend class SuppressDebug;
|
| + friend class EnableBreakInNonDebuggable;
|
|
|
| friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc
|
| friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc
|
| @@ -721,6 +723,23 @@ class DisableBreak BASE_EMBEDDED {
|
| };
|
|
|
|
|
| +// Stack allocated class for enabling breaking in a normally non-debuggable
|
| +// function (e.g. a builtin).
|
| +class EnableBreakInNonDebuggable BASE_EMBEDDED {
|
| + public:
|
| + explicit EnableBreakInNonDebuggable(Debug* debug, bool enable)
|
| + : debug_(debug), previous_(debug->break_in_nondebuggable_) {
|
| + debug_->break_in_nondebuggable_ = enable;
|
| + }
|
| + ~EnableBreakInNonDebuggable() { debug_->break_in_nondebuggable_ = previous_; }
|
| +
|
| + private:
|
| + Debug* debug_;
|
| + bool previous_;
|
| + DISALLOW_COPY_AND_ASSIGN(EnableBreakInNonDebuggable);
|
| +};
|
| +
|
| +
|
| class SuppressDebug BASE_EMBEDDED {
|
| public:
|
| explicit SuppressDebug(Debug* debug)
|
|
|