| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/debug/debug-evaluate.h" | 5 #include "src/debug/debug-evaluate.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/debug/debug-frames.h" | 10 #include "src/debug/debug-frames.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 void DebugEvaluate::ContextBuilder::MaterializeReceiver( | 243 void DebugEvaluate::ContextBuilder::MaterializeReceiver( |
| 244 Handle<JSObject> target, Handle<Context> local_context, | 244 Handle<JSObject> target, Handle<Context> local_context, |
| 245 Handle<JSFunction> local_function, Handle<StringSet> non_locals) { | 245 Handle<JSFunction> local_function, Handle<StringSet> non_locals) { |
| 246 Handle<Object> recv = isolate_->factory()->undefined_value(); | 246 Handle<Object> recv = isolate_->factory()->undefined_value(); |
| 247 Handle<String> name = isolate_->factory()->this_string(); | 247 Handle<String> name = isolate_->factory()->this_string(); |
| 248 if (non_locals->Has(name)) { | 248 if (non_locals->Has(name)) { |
| 249 // 'this' is allocated in an outer context and is is already being | 249 // 'this' is allocated in an outer context and is is already being |
| 250 // referenced by the current function, so it can be correctly resolved. | 250 // referenced by the current function, so it can be correctly resolved. |
| 251 return; | 251 return; |
| 252 } else if (local_function->shared()->scope_info()->HasReceiver() && | 252 } else if (local_function->shared()->scope_info()->HasReceiver() && |
| 253 !frame_->receiver()->IsTheHole()) { | 253 !frame_->receiver()->IsTheHole(isolate_)) { |
| 254 recv = handle(frame_->receiver(), isolate_); | 254 recv = handle(frame_->receiver(), isolate_); |
| 255 } | 255 } |
| 256 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); | 256 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace internal | 259 } // namespace internal |
| 260 } // namespace v8 | 260 } // namespace v8 |
| OLD | NEW |