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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 Object); | 104 Object); |
105 | 105 |
106 Handle<Object> result; | 106 Handle<Object> result; |
107 ASSIGN_RETURN_ON_EXCEPTION( | 107 ASSIGN_RETURN_ON_EXCEPTION( |
108 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL), | 108 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL), |
109 Object); | 109 Object); |
110 | 110 |
111 // Skip the global proxy as it has no properties and always delegates to the | 111 // Skip the global proxy as it has no properties and always delegates to the |
112 // real global object. | 112 // real global object. |
113 if (result->IsJSGlobalProxy()) { | 113 if (result->IsJSGlobalProxy()) { |
114 PrototypeIterator iter(isolate, result); | 114 PrototypeIterator iter(isolate, Handle<JSGlobalProxy>::cast(result)); |
115 // TODO(verwaest): This will crash when the global proxy is detached. | 115 // TODO(verwaest): This will crash when the global proxy is detached. |
116 result = PrototypeIterator::GetCurrent<JSObject>(iter); | 116 result = PrototypeIterator::GetCurrent<JSObject>(iter); |
117 } | 117 } |
118 | 118 |
119 return result; | 119 return result; |
120 } | 120 } |
121 | 121 |
122 | 122 |
123 DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate, | 123 DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate, |
124 JavaScriptFrame* frame, | 124 JavaScriptFrame* frame, |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 LoadFromContext(lookup_context, this_string, &global).ToHandle(&receiver); | 398 LoadFromContext(lookup_context, this_string, &global).ToHandle(&receiver); |
399 } else if (local_function->shared()->scope_info()->HasReceiver()) { | 399 } else if (local_function->shared()->scope_info()->HasReceiver()) { |
400 receiver = handle(frame_->receiver(), isolate_); | 400 receiver = handle(frame_->receiver(), isolate_); |
401 } | 401 } |
402 return isolate_->factory()->NewCatchContext(global_function, parent_context, | 402 return isolate_->factory()->NewCatchContext(global_function, parent_context, |
403 this_string, receiver); | 403 this_string, receiver); |
404 } | 404 } |
405 | 405 |
406 } // namespace internal | 406 } // namespace internal |
407 } // namespace v8 | 407 } // namespace v8 |
OLD | NEW |