| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 Isolate* isolate, Handle<SharedFunctionInfo> outer_info, | 88 Isolate* isolate, Handle<SharedFunctionInfo> outer_info, |
| 89 Handle<Context> context, Handle<HeapObject> context_extension, | 89 Handle<Context> context, Handle<HeapObject> context_extension, |
| 90 Handle<Object> receiver, Handle<String> source) { | 90 Handle<Object> receiver, Handle<String> source) { |
| 91 if (context_extension->IsJSObject()) { | 91 if (context_extension->IsJSObject()) { |
| 92 Handle<JSObject> extension = Handle<JSObject>::cast(context_extension); | 92 Handle<JSObject> extension = Handle<JSObject>::cast(context_extension); |
| 93 Handle<JSFunction> closure(context->closure(), isolate); | 93 Handle<JSFunction> closure(context->closure(), isolate); |
| 94 context = isolate->factory()->NewWithContext(closure, context, extension); | 94 context = isolate->factory()->NewWithContext(closure, context, extension); |
| 95 } | 95 } |
| 96 | 96 |
| 97 Handle<JSFunction> eval_fun; | 97 Handle<JSFunction> eval_fun; |
| 98 ASSIGN_RETURN_ON_EXCEPTION( | 98 ASSIGN_RETURN_ON_EXCEPTION(isolate, eval_fun, |
| 99 isolate, eval_fun, | 99 Compiler::GetFunctionFromEval( |
| 100 Compiler::GetFunctionFromEval(source, outer_info, context, SLOPPY, | 100 source, outer_info, context, SLOPPY, |
| 101 NO_PARSE_RESTRICTION, 0), | 101 NO_PARSE_RESTRICTION, RelocInfo::kNoPosition), |
| 102 Object); | 102 Object); |
| 103 | 103 |
| 104 Handle<Object> result; | 104 Handle<Object> result; |
| 105 ASSIGN_RETURN_ON_EXCEPTION( | 105 ASSIGN_RETURN_ON_EXCEPTION( |
| 106 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL), | 106 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL), |
| 107 Object); | 107 Object); |
| 108 | 108 |
| 109 // Skip the global proxy as it has no properties and always delegates to the | 109 // Skip the global proxy as it has no properties and always delegates to the |
| 110 // real global object. | 110 // real global object. |
| 111 if (result->IsJSGlobalProxy()) { | 111 if (result->IsJSGlobalProxy()) { |
| 112 PrototypeIterator iter(isolate, Handle<JSGlobalProxy>::cast(result)); | 112 PrototypeIterator iter(isolate, Handle<JSGlobalProxy>::cast(result)); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // referenced by the current function, so it can be correctly resolved. | 248 // referenced by the current function, so it can be correctly resolved. |
| 249 return; | 249 return; |
| 250 } else if (local_function->shared()->scope_info()->HasReceiver()) { | 250 } else if (local_function->shared()->scope_info()->HasReceiver()) { |
| 251 recv = handle(frame_->receiver(), isolate_); | 251 recv = handle(frame_->receiver(), isolate_); |
| 252 } | 252 } |
| 253 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); | 253 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 } // namespace internal | 256 } // namespace internal |
| 257 } // namespace v8 | 257 } // namespace v8 |
| OLD | NEW |