| Index: src/debug/debug-scopes.cc
|
| diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc
|
| index ce9cac2046cd2c7879959c7b9831ed13763773ed..5e3a1574130be13914db81ba1a2e60c9ed4e5d4f 100644
|
| --- a/src/debug/debug-scopes.cc
|
| +++ b/src/debug/debug-scopes.cc
|
| @@ -125,6 +125,19 @@ ScopeIterator::ScopeIterator(Isolate* isolate, Handle<JSFunction> function)
|
| UnwrapEvaluationContext();
|
| }
|
|
|
| +ScopeIterator::ScopeIterator(Isolate* isolate,
|
| + Handle<JSGeneratorObject> generator)
|
| + : isolate_(isolate),
|
| + frame_inspector_(NULL),
|
| + context_(generator->context()),
|
| + seen_script_scope_(false),
|
| + failed_(false) {
|
| + if (!generator->function()->shared()->IsSubjectToDebugging()) {
|
| + context_ = Handle<Context>();
|
| + }
|
| + UnwrapEvaluationContext();
|
| +}
|
| +
|
| void ScopeIterator::UnwrapEvaluationContext() {
|
| while (true) {
|
| if (context_.is_null()) return;
|
| @@ -623,6 +636,7 @@ bool ScopeIterator::SetParameterValue(Handle<ScopeInfo> scope_info,
|
| bool ScopeIterator::SetStackVariableValue(Handle<ScopeInfo> scope_info,
|
| Handle<String> variable_name,
|
| Handle<Object> new_value) {
|
| + if (frame_inspector_ == nullptr) return false;
|
| JavaScriptFrame* frame = GetFrame();
|
| // Setting stack locals of optimized frames is not supported.
|
| if (frame->is_optimized()) return false;
|
|
|