| Index: src/debug/debug.h
|
| diff --git a/src/debug/debug.h b/src/debug/debug.h
|
| index b499eb0eb89db3dabfedbee1c4539586e3bd0c38..e325257547770655d1104feb213feb90f1ff7c6e 100644
|
| --- a/src/debug/debug.h
|
| +++ b/src/debug/debug.h
|
| @@ -597,6 +597,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.
|
|
|
| @@ -662,6 +663,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
|
| @@ -720,6 +722,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)
|
|
|